Page MenuHomeFreeBSD

Fix getsockopt(..., IPPROTO_IP, IP_OPTIONS, ..., ...)
ClosedPublic

Authored by tuexen on Jan 5 2019, 12:44 PM.
Tags
None
Referenced Files
F161941658: D18753.diff
Wed, Jul 8, 5:06 AM
Unknown Object (File)
Sun, Jun 28, 4:17 PM
Unknown Object (File)
Mon, Jun 22, 1:25 AM
Unknown Object (File)
Wed, Jun 17, 4:35 AM
Unknown Object (File)
Sun, Jun 14, 9:11 AM
Unknown Object (File)
May 26 2026, 4:44 AM
Unknown Object (File)
May 25 2026, 7:57 PM
Unknown Object (File)
May 13 2026, 6:47 AM
Subscribers

Details

Summary

r336616 copies inp->inp_options using the m_dup() function. However, this function expects an mbuf packet header at the beginning, which is not true in this case. Therefore, use m_copym() instead of m_dup().

Test Plan

Use the attached test program to verify that getsockopt(..., IPPROTO_IP, IP_OPTIONS, ..., ...) works. Without the patch, the system panics when running the test program.

This issue what found by running syzkaller.

Diff Detail

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