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
Unknown Object (File)
Tue, Apr 16, 7:35 PM
Unknown Object (File)
Feb 2 2024, 5:52 AM
Unknown Object (File)
Jan 13 2024, 11:25 AM
Unknown Object (File)
Dec 27 2023, 9:06 PM
Unknown Object (File)
Dec 20 2023, 5:36 AM
Unknown Object (File)
Nov 6 2023, 5:39 PM
Unknown Object (File)
Nov 5 2023, 1:07 AM
Unknown Object (File)
Sep 12 2023, 11:27 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

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