From f2c214722c58d94ef7cb66db88084bc8d12ddfe1 Mon Sep 17 00:00:00 2001 From: Msprg <18015488+Msprg@users.noreply.github.com> Date: Thu, 27 Aug 2026 23:34:45 +0200 Subject: [PATCH] hf felica liteauth: use NULL instead of "" for options without a long name argtable treats the long option field as a string to scan; an empty literal makes arg_parse() read one byte past it. AddressSanitizer flags it as a global-buffer-overflow whenever the command's help is built, e.g. on every `proxmark3 --fulltext`. Every other command in the client passes NULL here. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 1 + client/src/cmdhffelica.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6114482c2..09e34906e 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 `hf felica liteauth` - empty long option names for `-c` and `-k` made argtable read past the string (found by ASAN on `--fulltext`) (@Msprg) - Added `sim020.bin` - v4.60 of sim module firmware, better T=0 handling and clock etu handling (@iceman1001) - Fixed `hf seos sam` - now have a invalid pacs guard (@iceman1001) - Changed i2c comms to auto-negotiation and use ATR-keyed rate cache for speedier smart card comms (@iceman1001) diff --git a/client/src/cmdhffelica.c b/client/src/cmdhffelica.c index e7f7a3ffc..7ce489725 100644 --- a/client/src/cmdhffelica.c +++ b/client/src/cmdhffelica.c @@ -8999,9 +8999,9 @@ static int CmdHFFelicaAuthenticationLite(const char *Cmd) { void *argtable[] = { arg_param_begin, arg_str0(NULL, "key", "", "set card key, 16 bytes"), - arg_str0("c", "", "", "set random challenge, 16 bytes"), + arg_str0("c", NULL, "", "set random challenge, 16 bytes"), arg_str0(NULL, "idm", "", "set custom IDm"), - arg_lit0("k", "", "keep signal field ON after receive"), + arg_lit0("k", NULL, "keep signal field ON after receive"), arg_param_end }; CLIExecWithReturn(ctx, Cmd, argtable, true);