Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp303291lqk; Sat, 9 Mar 2024 10:41:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW3o4f2wIzCuEXa3CLb6kf1RZS4TEvfdGoB9GIRRvf4sduQauZIsgR7Et1Hkhp4sj20qWCGpbcITLn64i9y7aw+KSPOPCnoSY77wcLxvg== X-Google-Smtp-Source: AGHT+IGPbpfHp0JJJqjqHB1e9OVYNyna6kz9tkECjPBoNojYWTENYNdUmvD0Vy3UpHBoLyU8nJi7 X-Received: by 2002:a05:6a00:1913:b0:6e5:5597:822d with SMTP id y19-20020a056a00191300b006e55597822dmr3515671pfi.33.1710009672207; Sat, 09 Mar 2024 10:41:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1710009672; cv=pass; d=google.com; s=arc-20160816; b=b/E+X+gtTkbC5QH6moCjTSZpEnRMoUQqN2ONVThik3Ig/ZvTCHQJtcoJ2iMI6nBhfh y9ROVLdUt5J2uqOwfW4mFj9p0LgpbwtNA1i3cGyWWpebGVkifjuLYL8uS+/+4cEINFLV Cjq5ijYaLQ70aYdcNWSQlt52r1lyOKD6QaoktvsHFeMbTlvrag/YvjxUiS6vJIGVVFtG lLoHmMm1JOwEIOx/f7hocBi3YnnAU2dtcgEqLNp7/ABHVZri6dn9Mxzt13gSSc1Z3T/L GOlhw17LtXRAevUQOxncfh2hIT7rQRKQHVeAqSE7L5e8PxmT+S82osgV70xpDuqwLifg G9uw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=KhtNX1eqFMYZYaxp6Dd1BuOi+gCKkNlaJdj1jhHOMKQ=; fh=Tzf5/5Nb9wdRHvuPX+y0pz0YxJ0VwvlTZDaNqnMkpHI=; b=VksUi0iNX7PhO5ynG7e1WrBnRm8E9IlF4IpvQp2Hs/KfNP67UQLhssme6vgN+JFJSf lsDbbwx/yBIETZQ3pf/XkPpddsfnHyEjhNCW556TaI2pLkQXfdGGyhtOZ+ClV6eDz8Lb x1neGA3p2D6IAfHbs+9l7H9RmZqEBoMcSaduvkK5/t6QzWiHQ+iLLZI+gtFSPc27Z6Ig gkuc2fcliLjiXbOojdAbsSq1l6rsZ5yr4xjccBq5Lw2uSPNInPwLRmTgL/ZkSKUgbB/W Zdj6ltrY1rXg1UDQgWUdsNzvkB6WN2YkD/H5OIKztC5NOrSPxuR0BO7O9mn9QcKzZW14 x35Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I281U3DH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p4-20020a639504000000b005c5e2c15169si1832588pgd.737.2024.03.09.10.41.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 10:41:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I281U3DH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98015-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98015-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C614A2814CF for ; Sat, 9 Mar 2024 18:41:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 718B046551; Sat, 9 Mar 2024 18:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I281U3DH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 980CE4595A; Sat, 9 Mar 2024 18:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710009656; cv=none; b=QyxZaQjzDWsJbqqZbmEkZhrVwH3Zlupk9hnp2vNr8yAUbsy0r6DPNzDtQXUP8fgJS1p5R+aa3wFjqBV70dSgWRaifOdCGPmtzlhsal/I1HU8AP4cjm3SfaAVkhGhsiFP4GJarTwk3mgrtyWWBIoycLy+/mn4USrUSVBb3d14kbw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710009656; c=relaxed/simple; bh=iFIjbYvr0QvzfMFGnrmtWfaFnK1GBevJBvSy4qoaWBo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lHmhA4vc4XLZl+41cCPT6eK2ehaa3B81gTQeqywhGgAksNO7kTqICGFYm2jII3fTp2sxkmIsPYrMXwH3CmSdueaGmR0QG9USUPJIvqS0omGo8rva3eqPRzrTA2bwRk77rHkOabx8KrX4WUBEwpGS895v4lkcm82BToCIJhb6qR4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I281U3DH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C230FC433F1; Sat, 9 Mar 2024 18:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710009656; bh=iFIjbYvr0QvzfMFGnrmtWfaFnK1GBevJBvSy4qoaWBo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=I281U3DH181gohn+rf8spyJhZXc57TZ8kM6bT0/z1D0hVY3T2QQZ3f2LrbOK+6ioH HMK7xg8sCs5/rJg2frxrgbSrOU0Z+DBievnLkmyjpbmhHK0VPOcHQerRld8uORBGuQ xPSDyzKki1o2J07nyOkGHHHbSCju/WyjrcCCVziaoNrB3XJUOwyR8U13e4CJSCTrHh MIyYOk8z/okD7Q5CIlgxjdIsctuKwTqx4jR41elFPOfjFhbi43U4nqX74gxJtzUSZh qv2ABaM48fS4yitV0bAZP60CDoN8EDR4Hxadw8tncQV3PZCgymBMA4Mv+tbrFYWGDe +S1U3hx0lkisA== Date: Sat, 9 Mar 2024 10:40:54 -0800 From: Jakub Kicinski To: Eric Dumazet Cc: syzbot , Petr Machata , davem@davemloft.net, dsahern@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [net?] kernel BUG in __nla_validate_parse Message-ID: <20240309104054.5f058be3@kernel.org> In-Reply-To: References: <00000000000088981b06133bc07b@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 9 Mar 2024 16:25:18 +0100 Eric Dumazet wrote: > On Sat, Mar 9, 2024 at 4:13=E2=80=AFPM syzbot > > .. > Petr, can you take a look ? >=20 > Thanks ! >=20 >=20 > commit 2118f9390d83cf942de8b34faf3d35b54f9f4eee > Author: Petr Machata > Date: Wed Mar 6 13:49:15 2024 +0100 >=20 > net: nexthop: Adjust netlink policy parsing for a new attribute Yeah +static const struct nla_policy rtm_nh_policy_del[] =3D { + [NHA_ID] =3D { .type =3D NLA_U32 }, +}; + err =3D nlmsg_parse(nlh, sizeof(struct nhmsg), tb, NHA_MAX, + rtm_nh_policy_del, extack); The policy size must be >=3D max_attr (NHA_MAX).