Page MenuHomeFreeBSD

Fix to avoid potential mbuf leak in network stack, if userland sends control messages to bad file descriptors.
ClosedPublic

Authored by lohithbsd_gmail.com on Sep 17 2016, 8:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 5 2024, 2:49 AM
Unknown Object (File)
Jan 12 2024, 8:34 AM
Unknown Object (File)
Dec 22 2023, 10:23 PM
Unknown Object (File)
Dec 1 2023, 5:08 AM
Unknown Object (File)
Nov 13 2023, 12:23 PM
Unknown Object (File)
Nov 12 2023, 11:36 PM
Unknown Object (File)
Oct 25 2023, 8:30 AM
Unknown Object (File)
Oct 15 2023, 1:18 AM
Subscribers

Details

Summary

In sendit(), if mp->msg_control is present, then in sockargs() we are allocating mbuf to store mp->msg_control. Later in kern_sendit(), call to getsock_cap(), will check validity of file pointer passed, if this fails EBADF is returned but mbuf allocated in sockargs() is not freed. Made code changes to free the same.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lohithbsd_gmail.com retitled this revision from to Fix to avoid potential mbuf leak in network stack, if userland sends control messages to bad file descriptors..
lohithbsd_gmail.com updated this object.
lohithbsd_gmail.com edited the test plan for this revision. (Show Details)
lohithbsd_gmail.com added a reviewer: hiren.
adrian added a reviewer: adrian.
This revision is now accepted and ready to land.Sep 18 2016, 12:12 AM
hiren edited edge metadata.

Thanks Lohith for the patch.

I'll wait for a few more days for any other comments before committing on your behalf.

This revision was automatically updated to reflect the committed changes.