git: 80b64ef0a10b - main - pf: don't assert on address family in pf_addrcpy()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 04 Mar 2025 16:00:04 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=80b64ef0a10b87ff2f79d1a6e18ecdf3e3bee1b1 commit 80b64ef0a10b87ff2f79d1a6e18ecdf3e3bee1b1 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2025-03-04 11:56:08 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2025-03-04 15:59:49 +0000 pf: don't assert on address family in pf_addrcpy() This gets called (through PF_ACPY()) on user supplied input, so we can't assume that the address family must be AF_INET or AF_INET6. Reported-by: syzbot+14dec0c55b8f512e271c@syzkaller.appspotmail.com Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index ad6be0c67c2a..349b10c346a7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -811,8 +811,6 @@ pf_addrcpy(struct pf_addr *dst, const struct pf_addr *src, sa_family_t af) case AF_INET6: memcpy(&dst->v6, &src->v6, sizeof(dst->v6)); break; - default: - unhandled_af(af); } } #endif /* INET6 */