Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4427867ybb; Mon, 23 Mar 2020 21:21:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuKRbq8LwADduL1XAn4zl6Sxof/hXGvSNPPUPMd/X9PDAttUhQh04TH2GC6bBuTazASOfFE X-Received: by 2002:aca:56c7:: with SMTP id k190mr2074735oib.127.1585023714266; Mon, 23 Mar 2020 21:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585023714; cv=none; d=google.com; s=arc-20160816; b=LcSlLvGu4xDuAih2su3EPH+FFejKXVv4zXvNiuAbv0hSCae4EFf+bSANbpc4Xtp/eF KJ+f+RWy6wbRBUKASBKz1aW4DpnxIRhU5nm8SPLIB3hDNPZIGBaEyyu4FmkPKxLHm6WW K/yn6LEyYYky09eEL1W8wAspg1ruK09JhDopndm8d2aM3NhzovB8sGq3/KKvyNgRCVHN xNt13Vlh8O8NKLZDW20N33xD+vaRJYKOsdnNDHSH7bgXPkI5vRkfCHd62oarLglxNWMY Tt2FJOTG/kJXadBEKvafUKYCv0ABr6UeqmnQGUyl1h94CKze4uHHE87WHaRZ41vTzLZY r53w== 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:from:subject:cc:to:message-id:date; bh=jJOXvS35x9dNDFuj2ZkjxTwSaxjklO4FNvnnnpYGms8=; b=zvCFAvKRuTUY2+nxxuNokzOMo3Yf4D+GkgE3s6VDF1SJ/ku1NSV7iBVSjHmb6RF+OC hRlPNPzyQ9bSRmyDEvl2JwJy3Atp6lm+7N3rey1DFRGKY9nsJia+htO5xnwCc/4oTfnE JiJYDvnVRBKqvyu2voj4az7LZn7+HHTwriExkoQCnRTv8xL1ifKoLTFDFs90Lucns9g5 5NBAYVboRwdsKk0K07bJ9mJFcNL0AaGssoPL6yyLApX2qhbb8JOiRLWA1Gv/1qY0I01Z qt09PvFKjUCQ1bLJ7L8k0jfG57aiZY+7/TBsgy82P2BGXMuYmuASiOXzriH991e/8X30 nVUg== 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 s14si8849739otp.243.2020.03.23.21.21.40; Mon, 23 Mar 2020 21:21:54 -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 S1726162AbgCXEUK (ORCPT + 99 others); Tue, 24 Mar 2020 00:20:10 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:56092 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725784AbgCXEUJ (ORCPT ); Tue, 24 Mar 2020 00:20:09 -0400 Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 701E71571F9CA; Mon, 23 Mar 2020 21:20:09 -0700 (PDT) Date: Mon, 23 Mar 2020 21:20:08 -0700 (PDT) Message-Id: <20200323.212008.1786774265459415637.davem@davemloft.net> To: mkubecek@suse.cz Cc: kuba@kernel.org, netdev@vger.kernel.org, johannes@sipsolutions.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH net v2] netlink: check for null extack in cookie helpers From: David Miller In-Reply-To: <20200320234650.E3383E0FD3@unicorn.suse.cz> References: <20200320234650.E3383E0FD3@unicorn.suse.cz> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 23 Mar 2020 21:20:09 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Kubecek Date: Sat, 21 Mar 2020 00:46:50 +0100 (CET) > Unlike NL_SET_ERR_* macros, nl_set_extack_cookie_u64() and > nl_set_extack_cookie_u32() helpers do not check extack argument for null > and neither do their callers, as syzbot recently discovered for > ethnl_parse_header(). > > Instead of fixing the callers and leaving the trap in place, add check of > null extack to both helpers to make them consistent with NL_SET_ERR_* > macros. > > v2: drop incorrect second Fixes tag > > Fixes: 2363d73a2f3e ("ethtool: reject unrecognized request flags") > Reported-by: syzbot+258a9089477493cea67b@syzkaller.appspotmail.com > Signed-off-by: Michal Kubecek Applied, thanks Michal.