From 015ee1664ead4fed5248354d3c379831f1cd350c Mon Sep 17 00:00:00 2001 From: Gabriele Gristina Date: Sat, 7 Nov 2026 00:14:02 +0100 Subject: [PATCH] lf paradox: refuse FC above 255 and CN above 65535 clone and sim accepted FC up to 999 and CN up to 99999, but the frame holds 8 bits of FC and 16 of CN, so FC 300 wrote the card of FC 44. The clone hint also named lf paradox read, which does not exist. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + client/src/cmdlfparadox.c | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1bedd944..f91efd607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed `lf paradox clone` and `sim` - FC above 255 and CN above 65535 are refused instead of cut, the clone hint names `lf paradox reader` (@matrix) - Fixed flashing with redirected output - the progress animation is drawn only when stdout is a terminal (@matrix) - Fixed `proxmark3 --flash`, `--dumpmem` and `--reboot-to-bootloader` exit status - a failure exits 1, a failed flash no longer ends with `All done` (@matrix) - Fixed `data rawdemod` - `--max`, `--samples` and the `--p2` clock no longer wrap above 255, `--fs` refuses values above 255 (@matrix) diff --git a/client/src/cmdlfparadox.c b/client/src/cmdlfparadox.c index 71aa19ebe..a37b14bb3 100644 --- a/client/src/cmdlfparadox.c +++ b/client/src/cmdlfparadox.c @@ -333,8 +333,9 @@ static int CmdParadoxClone(const char *Cmd) { return PM3_EINVARG; } - if (fc > 999 || cn > 99999) { - PrintAndLogEx(FAILED, "FC has a max value of 999 and CN has a max value of 99999"); + // the frame carries 8 bits of fc and 16 of cn + if (fc > 0xFF || cn > 0xFFFF) { + PrintAndLogEx(FAILED, "FC has a max value of 255 and CN has a max value of 65535"); return PM3_EINVARG; } @@ -384,7 +385,7 @@ static int CmdParadoxClone(const char *Cmd) { res = clone_t55xx_tag(blocks, ARRAYLEN(blocks)); } PrintAndLogEx(SUCCESS, "Done!"); - PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf paradox read`") " to verify"); + PrintAndLogEx(HINT, "Hint: Try " _YELLOW_("`lf paradox reader`") " to verify"); return res; } @@ -421,8 +422,9 @@ static int CmdParadoxSim(const char *Cmd) { return PM3_EINVARG; } - if (fc > 999 || cn > 99999) { - PrintAndLogEx(FAILED, "FC has a max value of 999 and CN has a max value of 99999"); + // the frame carries 8 bits of fc and 16 of cn + if (fc > 0xFF || cn > 0xFFFF) { + PrintAndLogEx(FAILED, "FC has a max value of 255 and CN has a max value of 65535"); return PM3_EINVARG; } if (raw_len != 0) {