From: David Heidelberg <david@ixit.cz>
To: vova tokarev <vladimirelitokarev@gmail.com>
Cc: oe-linux-nfc@lists.linux.dev
Subject: Re: Fwd: UAF in NFC digital DEP link-up (kernel heap info leak)
Date: Tue, 11 Aug 2026 19:37:56 +0200 [thread overview]
Message-ID: <24ad202a-fb2e-425b-9322-de367dc9795a@ixit.cz> (raw)
In-Reply-To: <CAGBKPgO1J1+2B-TTv3MX7J+zFeut3NRZG+DzgFu4Fhm588VXLg@mail.gmail.com>
Hello Vladimir,
thank you for the report. Would be possible to send a patch based on [1]?
Please let me know.
Thanks
David
P.S. Same gos for the 2nd finding.
[1] https://codeberg.org/linux-nfc/linux/src/branch/for-linus
On 07/08/2026 12:32, vova tokarev wrote:
> Hi,
>
> It's been almost two months since I reported this, and I haven't heard
> back. I recently learned I should reach out to the subsystem maintainer
> directly, so forwarding this to you.
>
> The bug: digital_in_send_atr_req() in net/nfc/digital_dep.c stores a
> raw struct nfc_target * pointer as cb_context (line 522). A concurrent
> poll cycle frees the targets array via nfc_targets_found(), leaving a
> dangling pointer. When digital_in_recv_atr_res() fires, it reads freed
> kmalloc-96 memory -- leaking a kernel heap pointer to userspace via
> NFC_ATTR_TARGET_INDEX netlink multicast.
>
> Triggers reliably within 12-15 seconds using nfcsim (no hardware).
> Full PoC attached in the original report.
>
> I'd appreciate any feedback when you get a chance.
>
> Thanks,
> Vladimir
>
> ---------- Forwarded message ---------
> From: *vova tokarev* <vladimirelitokarev@gmail.com
> <mailto:vladimirelitokarev@gmail.com>>
> Date: Sat, Jul 4, 2026 at 10:14 PM
> Subject: UAF in NFC digital DEP link-up (kernel heap info leak)
> To: <security@kernel.org <mailto:security@kernel.org>>
>
>
> Hi,
>
> I found a use-after-free in digital_in_recv_atr_res() in
> net/nfc/digital_dep.c. A stale nfc_target pointer freed by
> concurrent nfc_targets_found() is read by the ATR completion
> callback, leaking 4 bytes from freed kmalloc-96 to userspace
> via NFC_ATTR_TARGET_INDEX netlink broadcast.
>
> No hardware needed (nfcsim). Fires in ~12 seconds. The PoC
> leaks a kernel struct page * pointer (0xc51a8000), defeating
> KASLR. The stale value also corrupts LLCP state.
>
> Affected: Linux 3.13+
> Confirmed: 7.1.0 (aarch64) with KASAN
>
> Attached: report, two PoCs (minimal + info leak), KASAN output.
>
> Thank you,
> Vladimir Tokarev
>
--
David Heidelberg
prev parent reply other threads:[~2026-08-11 17:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAGBKPgO6_A75gVMj47d-TpRniaXQsgWfDb6T1VicmytV8GCLdg@mail.gmail.com>
2026-08-07 10:32 ` Fwd: UAF in NFC digital DEP link-up (kernel heap info leak) vova tokarev
2026-08-11 17:37 ` David Heidelberg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24ad202a-fb2e-425b-9322-de367dc9795a@ixit.cz \
--to=david@ixit.cz \
--cc=oe-linux-nfc@lists.linux.dev \
--cc=vladimirelitokarev@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox