From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] netlink: Relax attr validation for fixed length types Date: Wed, 06 Dec 2017 14:12:19 -0500 (EST) Message-ID: <20171206.141219.173668003844865413.davem@davemloft.net> References: <20171205195540.41822-1-dsahern@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: dsahern@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:53700 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbdLFTMU (ORCPT ); Wed, 6 Dec 2017 14:12:20 -0500 In-Reply-To: <20171205195540.41822-1-dsahern@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: David Ahern Date: Tue, 5 Dec 2017 12:55:40 -0700 > Commit 28033ae4e0f5 ("net: netlink: Update attr validation to require > exact length for some types") requires attributes using types NLA_U* and > NLA_S* to have an exact length. This change is exposing bugs in various > userspace commands that are sending attributes with an invalid length > (e.g., attribute has type NLA_U8 and userspace sends NLA_U32). While > the commands are clearly broken and need to be fixed, users are arguing > that the sudden change in enforcement is breaking older commands on > newer kernels for use cases that otherwise "worked". > > Relax the validation to print a warning mesage similar to what is done > for messages containing extra bytes after parsing. > > Fixes: 28033ae4e0f5 ("net: netlink: Update attr validation to require exact length for some types") > Signed-off-by: David Ahern David, please address Johannes's feedback and I'll apply this. Thank you.