Skip to contentSkip to conversation

CVE-2026-98576: nfc: llcp: fix slab-out-of-bounds reads when logging service names

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 18

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

nfc: llcp: fix slab-out-of-bounds reads when logging service names

nfc_llcp_wks_sap() and nfc_llcp_build_sdreq_tlv() pass non-null- terminated strings to pr_debug() using the %s format specifier. The buffers are allocated via kmemdup() or come from netlink attributes and are not guaranteed to be null-terminated, causing __dynamic_pr_debug() to read beyond the allocated region:

  KASAN: slab-out-of-bounds Read in __dynamic_pr_debug

Fix both call sites by using %.*s with the explicit length to limit the output to the actual length of the string.

The Linux kernel CVE team has assigned CVE-2026-98576 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 5.10.271 with commit 75f7c5a42fa1483f5912279a749417c284ad708f
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 5.15.222 with commit 6d4ca872830e46fcca9c086bf19fa9bd2faf09d2
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 6.1.189 with commit a143f7835faa4fe0178448289feea4f84eeee8d6
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 6.6.158 with commit 75bfd9ef4da2fb49dac1f19880d2ac4ccd07b45b
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 6.12.112 with commit 8afb6c194f5781798d3ab3edf243cf5a24a9d1f9
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 6.18.55 with commit 8978dff632519712d1fa432991e1f2e857f90239
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 7.2.9 with commit 4262b12277a3e056c95fc49e9c4d7bd97035d16c
	Issue introduced in 3.10 with commit d9b8d8e19b073096d3609bbd60f82148d128b555 and fixed in 7.3-rc5 with commit 7dcf371a35632f035baf77bcf2c129165f772ce4

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98576

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/nfc/llcp_commands.c
net/nfc/llcp_core.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/75f7c5a42fa1483f5912279a749417c284ad708f
	https://git.kernel.org/stable/c/6d4ca872830e46fcca9c086bf19fa9bd2faf09d2
	https://git.kernel.org/stable/c/a143f7835faa4fe0178448289feea4f84eeee8d6
	https://git.kernel.org/stable/c/75bfd9ef4da2fb49dac1f19880d2ac4ccd07b45b
	https://git.kernel.org/stable/c/8afb6c194f5781798d3ab3edf243cf5a24a9d1f9
	https://git.kernel.org/stable/c/8978dff632519712d1fa432991e1f2e857f90239
	https://git.kernel.org/stable/c/4262b12277a3e056c95fc49e9c4d7bd97035d16c
	https://git.kernel.org/stable/c/7dcf371a35632f035baf77bcf2c129165f772ce4