From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A7C6C04A95 for ; Wed, 28 Sep 2022 19:24:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232702AbiI1TYB (ORCPT ); Wed, 28 Sep 2022 15:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234542AbiI1TX1 (ORCPT ); Wed, 28 Sep 2022 15:23:27 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DFC5FA0CD for ; Wed, 28 Sep 2022 12:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=5kRQES51GWB6vCE6GW1HnR9MLQG1jthx7+279xcRF0c=; t=1664392903; x=1665602503; b=LEvJWYybAKejjOd7ECSuD4cU9ZegrdwNehWu5Gy67x7ZiMm R2SPHARCGPWhg6UpP47nuJnPMZbhNMHOC+lxE6qwCBglSM1YgSdVvBDR6HrME4ddtR11vTxlsSC+7 VFWGj+OnecOHm009fkWC9JvfrLdBGkXxIH2GWmlOdlk1FEZ4yQANMuI+wGLaldCpCp4T2hXRVnOs5 AbRCJwpEvoKKZUwyEE2inDpWqKao1Tu5ngTBWfOPntH9ND5vF8ink/LPIB12wGVk68zxw90INT15l 7gWB737cCKlzlCeUQeDODvdAB4ng8kl4PwvTsu6RuQVglVgxVjl2mWOKY3y2/SeQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1odcbt-00AVQc-0H; Wed, 28 Sep 2022 21:20:45 +0200 Message-ID: <68862d82fe886c8c7e3992bb9b892a14f6225bf7.camel@sipsolutions.net> Subject: Re: [PATCH net] genetlink: reject use of nlmsg_flags for new commands From: Johannes Berg To: Jakub Kicinski , davem@davemloft.net Cc: netdev@vger.kernel.org, edumazet@google.com, pabeni@redhat.com, Florent Fourcot , Nikolay Aleksandrov , Nicolas Dichtel , Pablo Neira Ayuso , Florian Westphal , Jamal Hadi Salim , Jacob Keller , Guillaume Nault , Hangbin Liu Date: Wed, 28 Sep 2022 21:20:43 +0200 In-Reply-To: <20220928183515.1063481-1-kuba@kernel.org> References: <20220928183515.1063481-1-kuba@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 2022-09-28 at 11:35 -0700, Jakub Kicinski wrote: > Commit 9c5d03d36251 ("genetlink: start to validate reserved header bytes"= ) > introduced extra validation for genetlink headers. We had to gate it > to only apply to new commands, to maintain bug-wards compatibility. > Use this opportunity (before the new checks make it to Linus's tree) > to add more conditions. >=20 > Validate that Generic Netlink families do not use nlmsg_flags outside > of the well-understood set. Makes sense. Reviewed-by: Johannes Berg Thanks for doing this :) johannes