Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/compat/linux/common



Module Name:    src
Committed By:   riastradh
Date:           Sun Sep 20 13:40:50 UTC 2026

Modified Files:
        src/sys/compat/linux/common: linux_socket.c

Log Message:
compat_linux recv(m)msg(2): Fix mistakes in error branches.

1. If copying out the cmsghdr _succeeds_, we want to copy out the
   cmsg data -- not if copying out the cmsghdr _fails_.

2. If any part of the BSD cmsg to Linux cmsg conversion or copyout
   _fails_, we must pass the whole mbuf chain to free_control_mbuf to
   close all the file descriptors in it -- otherwise, they would leak
   because the user process has no idea it has been given the fds.

3. Add missing `if (error)' before `return error' in recvmmsg(2)
   branch for copying in timeout.

Found while reviewing code nearby:

PR kern/60748: compat_linux: possible integer truncation/overflow
issues in socket syscalls


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/compat/linux/common/linux_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index