Thread (3 messages) 3 messages, 3 authors, 2017-08-25

Re: [PATCH] strparser: initialize all callbacks

flat view

From: David Miller <davem@davemloft.net>
Date: 2017-08-25 04:58:29
Also in: lkml

From: Eric Biggers <redacted>
Date: Thu, 24 Aug 2017 14:38:51 -0700
From: Eric Biggers <redacted>

commit bbb03029a899 ("strparser: Generalize strparser") added more
function pointers to 'struct strp_callbacks'; however, kcm_attach() was
not updated to initialize them.  This could cause the ->lock() and/or
->unlock() function pointers to be set to garbage values, causing a
crash in strp_work().

Fix the bug by moving the callback structs into static memory, so
unspecified members are zeroed.  Also constify them while we're at it.

This bug was found by syzkaller, which encountered the following splat:
 ...
Fixes: bbb03029a899 ("strparser: Generalize strparser")
Signed-off-by: Eric Biggers <redacted>
This commit is only in net-next, so that is where I am applying
this patch.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help