Read the docs

NULL lookup name in FreeRDP smartcard cache terminates client

Priority LOW 38Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

FreeRDP versions up to and including 3.28.0 are affected. The smartcard cache request decoders accept a NULL lookup name pointer for SCARD_IOCTL_READCACHEA and SCARD_IOCTL_WRITECACHEA, which the emulated smartcard cache code then passes to strlen. A peer-controlled cache request with a NULL lookup name terminates the client when smartcard emulation is enabled.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

Description from the GitHub advisory

## Summary The smartcard cache request decoders accept a NULL NDR pointer for LookupName in SCARD_IOCTL_READCACHEA and SCARD_IOCTL_WRITECACHEA. The decoded operation returns success and can contain a valid CardIdentifier while szLookupName == NULL. In smartcard emulation mode, the emulated smartcard cache sink calls strlen(LookupName), causing client termination. Reporter / credit: Bin Luo, UESTC ## Confirmed versions - Current master HEAD tested: f3b4347105114fe7453828736bea069999af319f - Supported release reproduced: 3.28.0, commit 5370fb26fbf034ecd11d3026b6ad639b5fff493f - This is not master-only. ## Affected code path - libfreerdp/utils/smartcard_pack.c: smartcard_unpack_read_cache_a_call() - libfreerdp/utils/smartcard_pack.c: smartcard_unpack_write_cache_a_call() - libfreerdp/utils/smartcard_call.c: smartcard_ReadCacheA_Call() - libfreerdp/utils/smartcard_call.c: smartcard_WriteCacheA_Call() - libfreerdp/emu/scard/smartcard_emulate.c: card_id_and_name_a() - libfreerdp/emu/scard/smartcard_emulate.c: Emulate_SCardReadCacheA() - libfreerdp/emu/scard/smartcard_emulate.c: Emulate_SCardWriteCacheA() ## Root cause The cache request decoders initialize call->szLookupName = nullptr and only populate it when the wire NDR pointer is nonzero. A zero mszNdrPtr is accepted as a valid NULL pointer case. The smartcard call layer forwards call->szLookupName unchanged to SCardReadCacheA/SCardWriteCacheA. When smartcard emulation is enabled, that reaches card_id_and_name_a(): WINPR_ASSERT(CardIdentifier); WINPR_ASSERT(LookupName); size_t len = strlen(LookupName) + 34; Thus a protocol-level NULL pointer accepted by the decoder becomes a required non-NULL string sink. ## Reproduction evidence I reproduced this through FreeRDP's smartcard IRP decode layer and the production emulated smartcard cache sink. Current master release build: wire-decode-read-null-name rc=0x00000000, szLookupName=(nil), CardIdentifier non-NULL wire-decode-write-null-name rc=0x00000000, szLookupName=(nil), CardIdentifier non-NULL wire-read-null-name-to-emulate exits 139 wire-write-null-name-to-emulate exits 139 Supported 3.28.0 release build: wire-decode-read-null-name rc=0x00000000, szLookupName=(nil), CardIdentifier non-NULL wire-decode-write-null-name rc=0x00000000, szLookupName=(nil), CardIdentifier non-NULL wire-read-null-name-to-emulate aborts at card_id_and_name_a:50, exit 134 wire-write-null-name-to-emulate aborts at card_id_and_name_a:50, exit 134 ## Preconditions - Smartcard redirection / smartcard emulation is enabled. - A peer-controlled smartcard cache request reaches the smartcard device-control path. - The request uses SCARD_IOCTL_READCACHEA or SCARD_IOCTL_WRITECACHEA with a NULL lookup-name NDR pointer and a valid CardIdentifier. ## Impact The demonstrated impact is client process termination. I am not claiming RCE, a write primitive, or credential compromise. This is stronger than a helper-level assertion because the issue is reproduced through the smartcard IRP decoder and the production emulated smartcard cache sink, including on supported release 3.28.0. ## Suggested fix Reject NULL szLookupName during smartcard cache request decoding, or validate it before calling SCardReadCacheA/SCardWriteCacheA. The emulated smartcard sink should return SCARD_E_INVALID_PARAMETER for NULL lookup names instead of asserting or calling strlen().

Why it matters now

Fix Fixed FreeRDP (c/c++): 3.29.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—FreeRDP (c/c++)<= 3.28.03.29.0Patch availableGHSA-ph3q-f9w8-7jf3
  • FreeRDP (c/c++) Vendor— Affected <= 3.28.0 Fixed in 3.29.0 Patch available GHSA-ph3q-f9w8-7jf3

Remediation

Upgrade FreeRDP to version 3.29.0, which fixes this issue.

Written with Claude Haiku 5.5 from the sources below · 2026-11-12

  • Fix · GHSA-ph3q-f9w8-7jf3 FreeRDP (c/c++) Fixed in 3.29.0 Advisory →

Timeline

  1. 2026-11-12 Threatist record created from GHSA-ph3q-f9w8-7jf3

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences