Linux: nfc: llcp: fix slab-out-of-bounds reads when logging service names
What fixes it
- 75f7c5a42fa1483f5912279a749417c284ad708fLinuxCVE List
- 6d4ca872830e46fcca9c086bf19fa9bd2faf09d2LinuxCVE List
- 75bfd9ef4da2fb49dac1f19880d2ac4ccd07b45bLinuxCVE List
- 8afb6c194f5781798d3ab3edf243cf5a24a9d1f9LinuxCVE List
- 8978dff632519712d1fa432991e1f2e857f90239LinuxCVE List
- 4262b12277a3e056c95fc49e9c4d7bd97035d16cLinuxCVE List
Show all 7 fixed versions
- 7dcf371a35632f035baf77bcf2c129165f772ce4LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
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.
Text from CVE List
Affected versions 18
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 75f7c5a42fa1483f5912279a749417c284ad708fCVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 6d4ca872830e46fcca9c086bf19fa9bd2faf09d2CVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before a143f7835faa4fe0178448289feea4f84eeee8d6CVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 75bfd9ef4da2fb49dac1f19880d2ac4ccd07b45bCVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 8afb6c194f5781798d3ab3edf243cf5a24a9d1f9CVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 8978dff632519712d1fa432991e1f2e857f90239CVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 4262b12277a3e056c95fc49e9c4d7bd97035d16cCVE List
- Linuxaffected: d9b8d8e19b073096d3609bbd60f82148d128b555 before 7dcf371a35632f035baf77bcf2c129165f772ce4CVE List
- Linuxaffected: 3.10CVE List
- Linuxunaffected: all versions before 3.10CVE List
- Linuxunaffected: 5.10.271 through 5.10.*CVE List
- Linuxunaffected: 5.15.222 through 5.15.*CVE List
- Linuxunaffected: 6.1.189 through 6.1.*CVE List
- Linuxunaffected: 6.6.158 through 6.6.*CVE List
- Linuxunaffected: 6.12.112 through 6.12.*CVE List
- Linuxunaffected: 6.18.55 through 6.18.*CVE List
- Linuxunaffected: 7.2.9 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 8
- git.kernel.org/stable/c/75f7c5a42fa1483f5912279a749417c284ad708fReferencevia CVE List
- git.kernel.org/stable/c/6d4ca872830e46fcca9c086bf19fa9bd2faf09d2Referencevia CVE List
- git.kernel.org/stable/c/a143f7835faa4fe0178448289feea4f84eeee8d6Referencevia CVE List
- git.kernel.org/stable/c/75bfd9ef4da2fb49dac1f19880d2ac4ccd07b45bReferencevia CVE List
- git.kernel.org/stable/c/8afb6c194f5781798d3ab3edf243cf5a24a9d1f9Referencevia CVE List
- git.kernel.org/stable/c/8978dff632519712d1fa432991e1f2e857f90239Referencevia CVE List
- git.kernel.org/stable/c/4262b12277a3e056c95fc49e9c4d7bd97035d16cReferencevia CVE List
- git.kernel.org/stable/c/7dcf371a35632f035baf77bcf2c129165f772ce4Referencevia CVE List