Page MenuHomeFreeBSD

Remove a seemingly unnecessary assertion from in6p_lookup_mcast_ifp().
ClosedPublic

Authored by markj on Jul 30 2020, 12:46 AM.
Tags
None
Referenced Files
F105708479: D25888.diff
Thu, Dec 19, 12:39 PM
Unknown Object (File)
Oct 27 2024, 2:31 AM
Unknown Object (File)
Oct 3 2024, 1:50 AM
Unknown Object (File)
Oct 3 2024, 1:50 AM
Unknown Object (File)
Oct 3 2024, 1:49 AM
Unknown Object (File)
Sep 28 2024, 2:56 PM
Unknown Object (File)
Sep 11 2024, 11:03 AM
Unknown Object (File)
Sep 4 2024, 7:23 PM
Subscribers

Details

Summary

syzkaller generated programs which created an IPv6 socket, cleared the
the IPV6_V6ONLY socket option, bound the socket to an IPv4-mapped
address, and invoked JOIN_GROUP or LEAVE_GROUP v6 socket options. Since
V6ONLY was cleared by the bind() call, this triggers an assertion
failure when in6p_lookup_mcast_ifp() gets called.

From reading the code I suspect that the assertion is unnecessary since
the inp address is not actually used by the multicast code. In other
words, whether or not the socket is connected or bound to an IPv4-mapped
IPv6 address is irrelevant. Thus I propose removing the assertion.

While here remove an unnecessary check for inp == NULL, which clearly
cannot happen.

Reported by: syzbot+d01ab3d5e6c1516a393c@syzkaller.appspotmail.com

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32653
Build 30105: arc lint + arc unit