Thread (3 messages) flat view 3 messages, 3 authors, 7d ago

Re: [PATCH net] octeontx2-af: fix out-of-bounds read setting MSI-X irq affinity

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-24 18:31:48
Also in: lkml

On Thu, 20 Aug 2026 11:24:51 +0530 Ratheesh Kannoth wrote:
rvu_register_interrupts() walks every MSI-X vector and uses strstr()
to match "Mbox" or "FLR" in irq_name before pinning those interrupts
to CPU 0. irq_name is a per-vector NAME_SIZE buffer, but not every
slot is populated before this loop runs. strstr() keeps scanning until
it finds a NUL terminator, so an uninitialized slot can trigger a KASAN
slab-out-of-bounds read at boot when debug options are enabled.

Use strnstr() with NAME_SIZE to bound the search within each vector's
name buffer.
String search for this sort of type tracking in C is a.. brave choice :/
But whatever..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help