From nobody Sat May 16 21:33:03 2026 X-Original-To: dev-commits-src-branches@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 4gHy3N1hFFz6d6Zg for ; Sat, 16 May 2026 21:33:04 +0000 (UTC) (envelope-from git@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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gHy3M6TNqz3pbj for ; Sat, 16 May 2026 21:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778967183; 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=Q6scHIhUVZthHUmIJBkpn09ZI3l+uevuG0zmT0Yfssg=; b=vFbwUS2DmBubM7tw5/pGy16+JmSBuwZ4uSH3ExWFvyZ1lHJ2A00b37dsYqYP4Ppx73GzVz pmVDuD7JagpF7hKYEKkWor5nk5YP8PH7F+CAbSdJuFrEieO/Hlo2a4jcVxleiPwhg/BKql beKnf6upSII+gYYAj7Yu7QaiP7RtwOje6uyThBApIDcll6YJSfI/QDBFT53nfYpD+ABnvY 6G0H6SEsi4wYaY/Mq4ax7sG22QR3Mi0GSTTiNJYbLRqUKBUuCfWXXaY6ugxE5Gt/0aCHpM fNzDaKTvKfoM99YgdnNudotTfLkyx+e6YStyWUVddyHDw29QgYEwmpI8eUJ2Gg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1778967183; a=rsa-sha256; cv=none; b=SvTXKrIKiIpxesdcqYQ0gSQQJo3ocBy6izlQySLVzQQIHZsGPyR9a18oTO8qGgZdIilyxd +3ry1P/w2ik2Q4oDyJEe/aRXspKAqq+yewI8YAvIOCWZ8aAKSUyXbfdrnHgK4NLIXiKnmL y8tclP2tFXuxH1aBbWkj9SiG/zu1oScFQpsoXpvOajAVqM+6SCtbnkVePSif96hVHvLvGC NUjXgtwYqtGv8czF1VGvyUQxdg92kfPr+1LX2P99+isCS4GEnARqRGLOCCcjgl/DqQxlGr 09uUefeb+t1vGEb/kN8odcLCeR3lFefhVg9YeJnmaaI1eC40dk94K3giPsC28g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1778967183; 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=Q6scHIhUVZthHUmIJBkpn09ZI3l+uevuG0zmT0Yfssg=; b=JzP9iMGtdPr41iOklaELoj5WJUvTaq/Oi5hF06R76DD6rgsNdCdvH7iFp6Oz9KFWxGuKW1 A7FF5RV8EroyY+mqtzmtmtGsJyqXfpplzNTfDRknrBOKR5cQRslKQu+UD3rT6yUGPg8JnP qJIC+X4AyY8L8z8CJ5gdsp/Vd+smKrbZSFLPfMhnhyTlC7wBs6AI2cbfhWkpMVMFfd9fxm slSwsaklw5Y0v62P4/sAmGALlQfOrWpjobGOLDCj4UnnH/vmUqOlrZ0/MI/3ohcyg/yHiX smIINS3d7Qd8JYr3nxNq9eT7NCgBLsV5rdqov3HLsrGY+cuQUIJaM0fATlJx2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gHy3M5XRDz1BD5 for ; Sat, 16 May 2026 21:33:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4011c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 16 May 2026 21:33:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: c9b5ce2422cc - stable/14 - rtnetlink: Check for allocation failure in nlattr_get_multipath() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c9b5ce2422cc1494a0dffee4c4e5864e39217472 Auto-Submitted: auto-generated Date: Sat, 16 May 2026 21:33:03 +0000 Message-Id: <6a08e28f.4011c.6e6e6a59@gitrepo.freebsd.org> The branch stable/14 has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=c9b5ce2422cc1494a0dffee4c4e5864e39217472 commit c9b5ce2422cc1494a0dffee4c4e5864e39217472 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-11 19:53:21 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-16 21:28:30 +0000 rtnetlink: Check for allocation failure in nlattr_get_multipath() Check for alloction failure on `npt_alloc()` for RTA_MULTIPATH attributes in `nlattr_get_multipath()`. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56954 (cherry picked from commit 188631e43a1a5d2985156141c2e244a925670683) (cherry picked from commit 3e2308d57080a2345e3db1139683368b504ee0bd) --- sys/netlink/route/rt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 8e9203182d76..fac174e01efd 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -443,6 +443,10 @@ nlattr_get_multipath(struct nlattr *nla, struct nl_pstate *npt, max_nhops = data_len / sizeof(struct rtnexthop); mp = npt_alloc(npt, (max_nhops + 2) * sizeof(struct rta_mpath_nh)); + if (mp == NULL) { + NLMSG_REPORT_ERR_MSG(npt, "%s: too many RTA_MULTIPATH", __func__); + return (ENOMEM); + } mp->num_nhops = 0; for (rtnh = (struct rtnexthop *)(nla + 1); data_len > 0; ) {