Received: by 2002:ab2:5d18:0:b0:1ef:7a0f:c32d with SMTP id j24csp343444lqk; Sat, 9 Mar 2024 12:56:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXRiqTbnn1/9O3Tk2bt/MjEgv/7AmkUX0bLFIocSZHJfyi+NGvJi+5OV0bDmNGwKep80QgvCw5FsmSdes2gBwbTLPHIH9L0cixAcW9kEw== X-Google-Smtp-Source: AGHT+IF22VnKm17pdH3trzGh7vwBZqEfyaTB8a2YqYSqd8JKVBSv8EH2BlNSArykRYqPpqRRCk7H X-Received: by 2002:a05:6512:523:b0:513:2b5f:3262 with SMTP id o3-20020a056512052300b005132b5f3262mr1692119lfc.26.1710017782311; Sat, 09 Mar 2024 12:56:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1710017782; cv=pass; d=google.com; s=arc-20160816; b=pOC4YJWDxsgTD98fe+R03f7IBpnOMn029Me665hVuP/WEhVLCxqOYDBkKtaR8w5qWm 7eAFIgC4AfMRyaEkJhBmrF1VOMaioUkjGNq9hsj0GMqalwtDQLrafnJajNvzIXKXXmZ6 vNz6ymYou3XhKrvQCtNvg3E+A4e4KRCA0uhu9/nHJbDNvVtxRd89lw4BVrtT8OqmFT8T 0qfM00CLAn7ALxfb/lVTnET/DICiypSNus4RC0SekbeVL+P4pwzZ3cBsoLKoOATgYcPj RWTe1ZFofhkrUrCo71N/tjo8dxUC+/BkakCmbxZjpDPvm7kOgqsBKIZYN/aHIeVJMC2J yRGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=0zHDTIeHWp+pwHO9YxyEyvVG0ySFARuUtam+Xti/ChA=; fh=QpcTziMaHNLK44j5gKY2a+5W88wZOfUn/2SrNAPyMvU=; b=D/MRiwIYTlrBYHt5sdCa+BBy5FVzwXVNiFIsr2AcRUYk2R8+eFJYX16I9+yVqiePwO NpkBk2oaFgbYHvUv0mGXF82sFOtQ6qAxUwKPmVv5JIwvgvBh7CoPG3jNTgx2uAbIArSb QPQT8fY2DDQlszwE57YBNZQrg9oXbNfsVYSRzc5GVxPdSTU4VySD8si+na3sevLFL5sl Kzt7rvChOgyYreweljSSKyeAqVsjl8vHS1Cq298VY5p4pn5A6Z0pyP4UH+frvjOXmkL/ xfPQm7/lT1ki35UXoHSL1X2tNZCIi4lJdqMa6pQ6g0wWG9FSV6kY9QLs9jW12474sxtI 3XdQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dgdnfULV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98038-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g16-20020a170906595000b00a45c69ee318si1050575ejr.837.2024.03.09.12.56.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Mar 2024 12:56:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dgdnfULV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98038-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98038-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A59201F21523 for ; Sat, 9 Mar 2024 20:56:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E95A750A67; Sat, 9 Mar 2024 20:56:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dgdnfULV" 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 186F820B22; Sat, 9 Mar 2024 20:56:11 +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=1710017772; cv=none; b=NteMNwpw6kLUOjML1GPxyf/lfG8OsmkBAv1+ScqvQ3OAf/r2RQRJujJTc9urqSn77yMlTlF9NF+i9SEd6haZkJjiStr+lAbmB6zBMXHIOOdiFT7n/Ni/f06NNNMHwTZhpG90d5gIggoJoIYRWVU04iJRa9IadsYW6pGNa50FKj8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710017772; c=relaxed/simple; bh=Ge91vCXg12ja9uivjnl8xwkuCY8wS7ldRFzB9lJWMrs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=J2m+iDGC6mczWjzERLoLDrWk2gBX323gbrm8iqIMA4790gL6PSpAu/Wg01cRTOxlyaN/EEY4cpo4wrnoCX/x5vi0WcAo51w/wy23D3+gKyeRS+GRKyewoaHaQomXe9lzSPozwfNe40ih4TTNScbLe/mSW+wMy7jBgATLo2hp5Rs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dgdnfULV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07364C433F1; Sat, 9 Mar 2024 20:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710017771; bh=Ge91vCXg12ja9uivjnl8xwkuCY8wS7ldRFzB9lJWMrs=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=dgdnfULVyGoT895Kfcmba2oOsvElcvvqQq+o1bOw6wZNV1B8VNPwT3K4nNjc5WBPE DBb8LQ/6i/2k7ppcE1uhp6sVvVHXIILelpBbVno+rYv2qMnuqVOgBCx//Ja0As8YTX uCV52rfcIM/Fk0THtk/D+CxK6gNyab7UPBVMrmQohkeeGBAhvT1dkTwlznmXNG9H9n xeoGkDJJ6U973XOXTtiljEled/qLu3QGtSY3IzRuAaF0/1hHPuUjMlZjDbJ0nRTwbn u+7SPhpdbcjaW+B2qbUjSLtxdQCC/6D0y84+12FzVwj2OW6/X4LfMixrmF3+mFTXr2 j7YQa6Pfc1W8w== Message-ID: <0b17a2f1-76aa-488f-a94a-b9d07f0459f9@kernel.org> Date: Sat, 9 Mar 2024 13:56:09 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [syzbot] [net?] kernel BUG in __nla_validate_parse Content-Language: en-US To: Jakub Kicinski , Eric Dumazet Cc: syzbot , Petr Machata , davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, pabeni@redhat.com, syzkaller-bugs@googlegroups.com References: <00000000000088981b06133bc07b@google.com> <20240309104054.5f058be3@kernel.org> From: David Ahern In-Reply-To: <20240309104054.5f058be3@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 3/9/24 11:40 AM, Jakub Kicinski wrote: > On Sat, 9 Mar 2024 16:25:18 +0100 Eric Dumazet wrote: >> On Sat, Mar 9, 2024 at 4:13 PM syzbot >>> .. >> Petr, can you take a look ? >> >> Thanks ! >> >> >> commit 2118f9390d83cf942de8b34faf3d35b54f9f4eee >> Author: Petr Machata >> Date: Wed Mar 6 13:49:15 2024 +0100 >> >> net: nexthop: Adjust netlink policy parsing for a new attribute > > Yeah > > +static const struct nla_policy rtm_nh_policy_del[] = { > + [NHA_ID] = { .type = NLA_U32 }, > +}; > > + err = nlmsg_parse(nlh, sizeof(struct nhmsg), tb, NHA_MAX, > + rtm_nh_policy_del, extack); > > The policy size must be >= max_attr (NHA_MAX). ARRAY_SIZE is sufficient for both tb and parse. That is what the rest of the file uses.