В ядре Linux была устранена следующая уязвимость: nfc: llcp: fix slab-out-of-bounds читает, когда имена служб регистрации nfc_llcp_wks_sap() и nfc_llcp_build_sdreq_tlv() передают строки без нулевого конца в pr_debug() с использованием спецификатора формата %s. Буферы выделяются через kmemdup() или исходят из атрибутов netlink и не гарантированно являются нулевыми, в результате чего __dynamic_pr_debug() читается за пределами выделенного региона: KASAN: slab-out-of-bounds Read в __dynamic_pr_debug Fix оба вызывают сайты, используя %.*s с явной длиной, чтобы ограничить вывод до фактической длины строки.
Показать оригинальное описание (EN)
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.