From nobody Mon May 22 21:30:08 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QQ9b43gxZz4CTPY for ; Mon, 22 May 2023 21:30:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQ9b41VJmz4Fqy for ; Mon, 22 May 2023 21:30:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684791008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f/rE43t6QYpV60BZkC2JxgeWvT5y/YDRnAnOmlstsWE=; b=Ahv0NiVDhvOymHOiKGFc87hk/ZQyeCrGhHxtZ2EhmoeFllJWVtE4hmytmVqBt2gzFDLmoW PVmTOKIRh3jwSS9Ey8NgkypdK3DNvdzvbLXVNCjlGdk5l31c/H6EjCy/MmL/KnTRDIIICH utDVwqZxg9F+bqAVdACAPMRG8iBCyWpSKOM7qRu9XQ4Hp4ZnRrSSQJ7nfAth7+kuyi1HaU r+xZWjwGuHZPAwe+pDibzQ2SlxHcjjkJTNDZFLKLengW9zBurHkXNaHdh0cf7XDNvUDaKy AKuGysixuEKraLVRPRRKcBeUhukWAdsfrKk7FyNA8rd0Q4lKfW7hypvlnPj8sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684791008; a=rsa-sha256; cv=none; b=iCEsi/iPlsd4ABYU+D7GX1DLmcyk33xmVhvQlfHhoHDLaKEMMD50OBEW2o2AR6o1QbAq7a W5YiVpp6RG+3MzsyLqr7e52GyE1N7SRnTryYQgW1Pm4Z2VUsfKBSigZnbKng8rqCfVgujn ZEpJD9GN/o24grzy62FT2F08/w/n/LOj8v+yX78EDAR8UGStPL7xvFgx0uAou2oSpoR3EK qusfYNH87VpQSS02JOY0FSUazGgLrbtDM0Eiyc9lxW87M++O1zXVKBRL5Oupa3wL01QT36 /JvHPSkn6FxgWOkU4u7MnBv5CV34eQk5nbPrdOuI0IfG2QqqqLYnWB8pvDS5XQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QQ9b40Rm1zYj5 for ; Mon, 22 May 2023 21:30:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 34MLU7Km084931 for ; Mon, 22 May 2023 21:30:07 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 34MLU7KV084930 for bugs@FreeBSD.org; Mon, 22 May 2023 21:30:07 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271573] [panic] ip_output->in_ifaddr_broadcast NULL pointer dereference after route change Date: Mon, 22 May 2023 21:30:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.4-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vangyzen@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271573 Bug ID: 271573 Summary: [panic] ip_output->in_ifaddr_broadcast NULL pointer dereference after route change Product: Base System Version: 12.4-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: vangyzen@FreeBSD.org FreeBSD 12.4-STABLE #3 stable/12-n236157-886d82afb03 With a busy TCP flow using a non-RTF_HOST route on an IFF_BROADCAST interfa= ce, a "route change" operation on that route that changes the interface address= can leave "ia" NULL, triggering a NULL pointer dereference. #6 0xffffffff811020df in trap_pfault (frame=3D0xfffffe002c1e8420,=20 usermode=3D, signo=3D, ucode=3D) at /usr/src/sys/amd64/amd64/trap.c:739 #7 #8 0xffffffff80d63c64 in in_ifaddr_broadcast (in=3D..., ia=3D0x0) at /usr/src/sys/netinet/in.c:1003 #9 0xffffffff80d75ee6 in ip_output (m=3D, opt=3D,=20 ro=3D, flags=3D, imo=3D0x0, inp=3D) at /usr/src/sys/netinet/ip_output.c:404 #10 0xffffffff80e03787 in tcp_output (tp=3D0xfffff8000c922000) at /usr/src/sys/netinet/tcp_output.c:1444 There may be multiple changes that contribute to this, but one in particula= r is commit 1ebec5faf41f, which creates a window in rtrequest1_fib_change() when rt->rt_ifa is NULL. In my opinion, the right fix would close that window.= =20 This might use the wrong interface address, but it won't panic. It also wo= n't use freed memory because that's prevented by the net_epoch. This probably does not affect 13.x or later, which use nexthop. --=20 You are receiving this mail because: You are the assignee for the bug.=