mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
socket: Don't assume m0 != NULL in sbappendcontrol_locked()
Some callers (e.g., ktls_decrypt()) violate this assumption and thus
could trigger a NULL pointer dereference in KMSAN kernels.
Reported by: glebius
Fixes: ec45f952a2 ("sockbuf: Add KMSAN checks to sbappend*()")
MFC after: 1 week
This commit is contained in:
parent
d3d0b73557
commit
30f8cb812e
1 changed files with 2 additions and 1 deletions
|
|
@ -1326,7 +1326,8 @@ sbappendcontrol_locked(struct sockbuf *sb, struct mbuf *m0,
|
|||
{
|
||||
struct mbuf *m, *mlast;
|
||||
|
||||
kmsan_check_mbuf(m0, "sbappend");
|
||||
if (m0 != NULL)
|
||||
kmsan_check_mbuf(m0, "sbappend");
|
||||
kmsan_check_mbuf(control, "sbappend");
|
||||
|
||||
sbm_clrprotoflags(m0, flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue