From d618cc99d763265495b18c5530371ae48d1f51c4 Mon Sep 17 00:00:00 2001 From: bluhm Date: Tue, 6 Feb 2024 00:18:53 +0000 Subject: [PATCH] Invert broken check of panic string in if_linkstate(). original bug report from syzkaller Reported-by: syzbot+d19060a65721eb432a72@syzkaller.appspotmail.com broken fix found by Hrvoje Popovski hint to the problem and OK deraadt@ --- sys/net/if.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index 6677cf0251a..9b971251ec1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.717 2024/02/05 18:27:47 mvs Exp $ */ +/* $OpenBSD: if.c,v 1.718 2024/02/06 00:18:53 bluhm Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1788,7 +1788,7 @@ if_linkstate(struct ifnet *ifp) { NET_ASSERT_LOCKED(); - if (panicstr != NULL) { + if (panicstr == NULL) { rtm_ifchg(ifp); rt_if_track(ifp); } -- 2.20.1