HomeFreeBSD

Fix synchronization in the IPV6_2292PKTOPTIONS set handler.

Description

Fix synchronization in the IPV6_2292PKTOPTIONS set handler.

The inpcb needs to be locked when we update output packet options.
Otherwise it is possible for the IPV6_2292PKTOPTIONS handler to free
packet option structures while another thread is reading or updating
them.

Note that the option handler is still kind of broken. For instance it
frees all options before performing privilege checks for individual
options. However, this can be fixed separately.

Reported by: syzbot+52eb0fd4ddc119787f9d@syzkaller.appspotmail.com
Reviewed by: bz, tuexen
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24125

Details

Provenance
markjAuthored on
Reviewer
bz
Differential Revision
D24125: Fix synchronization in the IPV6_2292PKTOPTIONS set handler.
Parents
rS359153: loader: remove libsa/crc32.c and use version from zlib
Branches
Unknown
Tags
Unknown