From bdaaf9fd859a7a7113bff145edc77a1b0ec3e360 Mon Sep 17 00:00:00 2001 From: Jooyoung Date: Sat, 19 Sep 2026 01:13:25 -0400 Subject: [PATCH] hf iclass view: surface unhandled SIO TLV tags in Insights print_iclass_sio_decoded() silently dropped any TLV tag it did not explicitly handle. Real credentials (e.g. SR) carry context tags such as [5]/[9] that were therefore invisible in the Insights output, even though the raw block dump and the --verbose ASN1 view showed them. Print unhandled tags as 'Unknown tag 0xNN : ' so the human-readable Insights view is lossless. No semantic guessing is done; --verbose still provides the full ASN1 TLV. --- CHANGELOG.md | 3 +++ client/src/cmdhficlass.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b5fd6b6..0d2e6b588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ 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] +- Changed `hf iclass view` - SIO Insights now surfaces unhandled TLV tags (e.g. the [5]/[9] context tags seen on SR credentials) instead of silently dropping them (@youngh82) + ## [Frosty Lemon.4.23346][2026-09-18] - Fixed `hf mfdes sim` - the ATS now advertises 106 kbit/s only, PPS to a higher rate is refused, a selected card ignores REQA/WUPA, and ISO-DEP block recovery now follows the card sequence (@mistial-dev) - Added `hf mfdes sim` - answers ISO 7816 SELECT by DF name or file id with real status words, so a reader that opens with a SELECT reaches the card (@mistial-dev) diff --git a/client/src/cmdhficlass.c b/client/src/cmdhficlass.c index 0d3a64263..6ee9d9ff8 100644 --- a/client/src/cmdhficlass.c +++ b/client/src/cmdhficlass.c @@ -5293,6 +5293,10 @@ static void print_iclass_sio_decoded(uint8_t *sio, size_t sio_len) { break; } default: + // Surface tags we don't decode yet instead of dropping them silently. + // Real credentials (e.g. SR) carry context tags such as [5]/[9] that + // would otherwise be invisible here; `--verbose` shows the full ASN1 TLV. + PrintAndLogEx(INFO, " Unknown tag 0x%02X : " _YELLOW_("%s"), tag, sprint_hex_inrow(val, len)); break; } }