HomeFreeBSD

socket: Don't assume m0 != NULL in sbappendcontrol_locked()

Description

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: ec45f952a232 ("sockbuf: Add KMSAN checks to sbappend*()")
MFC after: 1 week

(cherry picked from commit 30f8cb812e27d8ab40a2c0669ac20a8ee45a7c56)

Details

Provenance
markjAuthored on Feb 2 2024, 6:58 PM
Parents
rG323226829ae7: rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls
Branches
Unknown
Tags
Unknown