]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r360344:
authorKristof Provost <kp@FreeBSD.org>
Sun, 3 May 2020 16:06:17 +0000 (16:06 +0000)
committerKristof Provost <kp@FreeBSD.org>
Sun, 3 May 2020 16:06:17 +0000 (16:06 +0000)
commita596cad00f8d36811a6d55e10c579ace4d0bc01b
treeadf67e563383fa14bae47bf07b117417f12f8b5b
parent09352f65a0ad8b2e276c714c9af02b19f247f65e
MFC r360344:

pf: Improve input validation

If we pass an anchor name which doesn't exist pfr_table_count() returns
-1, which leads to an overflow in mallocarray() and thus a panic.

Explicitly check that pfr_table_count() does not return an error.

Reported-by: syzbot+bd09d55d897d63d5f4f4@syzkaller.appspotmail.com
sys/netpfil/pf/pf_ioctl.c