Page MenuHomeFreeBSD

ipsec: Validate the protocol identifier in ipsec4_ctlinput()
ClosedPublic

Authored by markj on Sep 9 2021, 5:11 PM.
Tags
None
Referenced Files
F173422292: D31890.id94949.diff
Fri, Sep 25, 8:35 PM
Unknown Object (File)
Fri, Sep 25, 7:59 PM
Unknown Object (File)
Fri, Sep 25, 5:59 PM
Unknown Object (File)
Wed, Sep 9, 5:19 PM
Unknown Object (File)
Mon, Sep 7, 11:12 PM
Unknown Object (File)
Sat, Sep 5, 10:59 PM
Unknown Object (File)
Aug 19 2026, 11:35 AM
Unknown Object (File)
Aug 18 2026, 5:07 PM
Subscribers

Details

Summary

key_allocsa() expects to handle only IPSec protocols and has an
assertion to this effect. However, ipsec4_ctlinput() has to handle
messages from ICMP unreachable packets and was not validating the
protocol number. In practice I believe such a packet would simply fail
to match any SADB entries and would thus be ignored.

Reported by: syzbot+6a9ef6fcfadb9f3877fe@syzkaller.appspotmail.com

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable