[PATCH 08/27] selftests/landlock: Handle a missing control message in recv_fd()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 8 14:31:43 UTC 2026


> CMSG_FIRSTHDR() returns NULL when recvmsg(2) did not receive any
> ancillary data, e.g. when the peer closed the socket without sending an
> FD.  recv_fd() dereferences the result unconditionally and crashes
> instead of returning an error.
> 
> Return -EIO in that case.
> 
> Assisted-by: LLM
> Signed-off-by: Günther Noack <gnoack3000 at gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261008142604.39107-2-gnoack3000@gmail.com?part=8




More information about the Linux-security-module-archive mailing list