nfc: hci: shdlc: Stop timers and work before freeing context
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4a61cd6687fc6348d08724676d34e38160d6cf9b · < 1cb97b1225450af3f7b728777929ba50c6a58ced| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
nfc: hci: shdlc: Stop timers and work before freeing context
llc_shdlc_deinit() purges SHDLC skb queues and frees the llc_shdlc structure while its timers and state machine work may still be active.
Timer callbacks can schedule sm_work, and sm_work accesses SHDLC state and the skb queues. If teardown happens in parallel with a queued/running work item, it can lead to UAF and other shutdown races.
Stop all SHDLC timers and cancel sm_work synchronously before purging the queues and freeing the context.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
From the CVE record · Linux
The Linux kernel’s NFC HCI SHDLC teardown can free its context while timer callbacks or state-machine work are still active. If teardown overlaps with queued or running work, this can cause a use-after-free or other shutdown races. The input does not specify an attack path, authentication requirements, or user interaction.
Engineers running Linux kernels with NFC HCI SHDLC should check whether their kernel includes the fix; affected versions are not specified.