Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7185253yba; Thu, 2 May 2019 05:52:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPLMekot/Y1zh+fF1twqCrOZou38g9LQQODR3PTqwnDuTqqKSWea3CNmszSmPbhfoxuuxU X-Received: by 2002:a65:478a:: with SMTP id e10mr3834315pgs.310.1556801567820; Thu, 02 May 2019 05:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556801567; cv=none; d=google.com; s=arc-20160816; b=pjgiAT1Pci1g6MIZDNQKUC/Fzf9phCIpVZHVQeOxpwJSo72Xm72T7c4h8xVuw9uJl0 qB98vp0e5DQVsuNf3Eje8FrXC4140hp4Un3vIV3+IN396HtNnPQInIMN1Z11coeKKNEj 70yckkiX6uyGcBtHWHkghdSPB5fm3i0G5RDsEBoo0vK1AEXjm/k3oCIMVykDMvHjx7Jg rII7/uvgca8fhemqG7Akeg9ORWLGqBeh/18V6nnqCMwlGK+V2WMy0IhRLhx3TXIK2pPk 69qDTuOBuIcyeqk11isinf+s+3gAOOeKQKXYkhyNLFJeIG/qIV72k1r0Hac8YMjNPvlO rH5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=S8TlEMve9nnx+hhL8b3ndo1Io0yWEhS2qbYGFuW2zJQ=; b=FWAsHXY167cLZU83myKNe1UulSoCu4T1fQYcairm0iHMNhJCARZ2QZC1d7nc+k0Zgk N9fs+Os1/C5eFA65itZey1tWaPKBWVt3ORVry8mZYUzjXA7rOljLpU6uNOEKKNFcv2G7 8SioWAf409pnHvT6r4Ss0EjNEEL9CFMReKaiE9ISzqHbSTEBm1b6/gW9JuvLZXA96CH0 iavfCcm77GCcjAPtLIPMNSJZncJ8ucaNA4etRFXFoXWo+IKn3tP2gObv6HOr8d2P2d3g vnu0VjEW2RhSbBOp5VCbMYQZ20tzyzNiuYPDqshUnm3K9DmInGWdoCuc77T6bExePE2+ BnVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g31si45575852plg.154.2019.05.02.05.52.32; Thu, 02 May 2019 05:52:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726405AbfEBMvk (ORCPT + 99 others); Thu, 2 May 2019 08:51:40 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:55502 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfEBMvj (ORCPT ); Thu, 2 May 2019 08:51:39 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hMBBW-0000vp-Eu; Thu, 02 May 2019 14:51:34 +0200 Message-ID: <031933f3fc4b26e284912771b480c87483574bea.camel@sipsolutions.net> Subject: Re: [PATCH net-next 1/3] genetlink: do not validate dump requests if there is no policy From: Johannes Berg To: Michal Kubecek , "David S. Miller" Cc: "netdev@vger.kernel.org" , David Ahern , "linux-kernel@vger.kernel.org" Date: Thu, 02 May 2019 14:51:33 +0200 In-Reply-To: <0a54a4db49c20e76a998ea3e4548b22637fbad34.1556798793.git.mkubecek@suse.cz> References: <0a54a4db49c20e76a998ea3e4548b22637fbad34.1556798793.git.mkubecek@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 (3.28.5-2.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-05-02 at 12:48 +0000, Michal Kubecek wrote: > Unlike do requests, dump genetlink requests now perform strict validation > by default even if the genetlink family does not set policy and maxtype > because it does validation and parsing on its own (e.g. because it wants to > allow different message format for different commands). While the null > policy will be ignored, maxtype (which would be zero) is still checked so > that any attribute will fail validation. > > The solution is to only call __nla_validate() from genl_family_rcv_msg() > if family->maxtype is set. D'oh. Which family was it that you found this on? I checked only ones with policy I guess. Reviewed-by: Johannes Berg johannes