Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp8982976ybi; Tue, 23 Jul 2019 19:26:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHWJnwYn7PpgutrK5Ttcap07i9au0iv/v4OEx2vrf+mWc8F68yxUqZQNMKs5OznhPZnFip X-Received: by 2002:a17:90a:17a6:: with SMTP id q35mr85456878pja.118.1563935199804; Tue, 23 Jul 2019 19:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563935199; cv=none; d=google.com; s=arc-20160816; b=swAL73J3fDOpve1QpXEwG7lf3iNS9oOwKgb9gp2eyoIQZLfDvWSSId2JOSH3Ic0E7a mQ7o/gj5fN75jVtfQn3/XdcW6EhXx7Nb8tkqfGK2qKrIZTONxvPZWWBKUWGouslODiaS YHFLSqoCNO3z+h6R6ht6bGZP2RIgZ8CtNA8+4yZeZlyuAzzMouUrVQeWxB4en/KWiTPY vPmgad0xtxLFq3Rk+M6/9Q2GuFgmdWzKMQ388W1/8ViCgNHlfXEn3+25cC6+CZ8et1bn EtcUawsp4nGESzpoKN5cEL9v3hQtzDvzZeNooh+eg7R/zVzVX9SJGS+kvgcbag+gKviZ CDdA== 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:message-id:subject:cc:to:from:date :dkim-signature; bh=KlX8mnc2TLKGzdYuaVA7PerYYgEg13kGbXM6bN4nXSw=; b=M4CT6wQ27vELSGdsGFPs+11xpLn4HKseTrq8jXko4GKshgZIaIYP9YMCi3KAKIwphD S5xhQMWdO7Ag87tqcArhFfVo3Plv/jJ48fnEGBFsNvBE4Q8H/hxFC3EmCTVjauaWELn8 OjDfM5Lxq1cF92hBMOAGXdk42kmiV/eid8rmuQ4uM3KXy0NqOgrHcDBAq5LAEWe6P+CG mThb3dGdfJ8PRZE69D6PCPD36E6M1rZopmEwNadz41FZGyRaWJ5NKaBhYFRduoIA7xYK pvkdCpNkXdy4EiLIa3xWNy0DicGeJFTTXXyI8EaddJdbO4w/RKoZnwhoSra4zYXXP8lZ /IMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=djQaLMYD; 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 u8si13817009plq.291.2019.07.23.19.26.23; Tue, 23 Jul 2019 19:26:39 -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; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=djQaLMYD; 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 S1733128AbfGWSCO (ORCPT + 99 others); Tue, 23 Jul 2019 14:02:14 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:32837 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbfGWSCN (ORCPT ); Tue, 23 Jul 2019 14:02:13 -0400 Received: by mail-pg1-f195.google.com with SMTP id f20so10566031pgj.0 for ; Tue, 23 Jul 2019 11:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KlX8mnc2TLKGzdYuaVA7PerYYgEg13kGbXM6bN4nXSw=; b=djQaLMYDSvS5ovODS2W3nM9t/QQHs8PEXoTjQ3wOqww5bxOB6jjf2EvKlkBc/5fE3q BJjyIgQgUmj4qSXtatSBNLNHCmzSkvEYiIb+UotUf0YhghHTj01C7r+20ybsUeFWYY2E apbhNSfYemvuIuXIs5Ma8RWBRtklH0JsONLwwptCeU/CqOa5qpN5hpRh4fLR464kGsCR uvOGT6jxC6avBpOIJg7ktKk6tThvF/XQS9JyVGenM6lYOJFeCTzlfOmlZSfIub/ef3H/ +xqDfJbZj53J7/gr6UucKldZYnWMREF+dKF3NJiMCHT+MCVaTozd76SVcQFGcamAbYeY c9mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KlX8mnc2TLKGzdYuaVA7PerYYgEg13kGbXM6bN4nXSw=; b=pSstiSjBI5rdJvCw8UGLhS++6jYujuWSQxsMGSe++MOxL9hCVVHy25IMx2yYtY1+wQ PyJ1ROKgAHrpvetgQQck/gxKxdLH34ywyU3eEdkpgLzc4XaNs++Igan6Hyh+UGpSWyIL J/u3JTMWoCZ2zzc7P3Z7si7Yn0+B5hHi/6yaRGLT2v2LL930IYVu8lnYXsLzTaapZWPN lT+Mo6DfaIAgzUJjrWpGZAFBashsJDjivQEXX/c8Iso5YbrAnjbaWzKgyY4esCoIKyrV CnUOZiLEdt6drpZnk+adjuI8XIswkR+bfmUmfedMv95EgBW5YJOpRDPG7D+rahm2pfH4 TJZA== X-Gm-Message-State: APjAAAXBJsUE49rldEkE0Q9pUvAIpL27/Yu+k2nFIWNo0DBz5jyjMxRU 9YN2TfYj/5hIIzpVEw2kyYI= X-Received: by 2002:a62:3c3:: with SMTP id 186mr6989648pfd.21.1563904933318; Tue, 23 Jul 2019 11:02:13 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z6sm15486251pgk.18.2019.07.23.11.02.12 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 11:02:13 -0700 (PDT) Date: Tue, 23 Jul 2019 11:02:06 -0700 From: Stephen Hemminger To: Michal Kubecek Cc: "David S. Miller" , netdev@vger.kernel.org, Johannes Berg , David Ahern , linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 3/3] netlink: add validation of NLA_F_NESTED flag Message-ID: <20190723110206.4cb1f6b1@hermes.lan> In-Reply-To: <6b6ead21c5d8436470b82ab40355f6bd7dbbf14b.1556806084.git.mkubecek@suse.cz> References: <6b6ead21c5d8436470b82ab40355f6bd7dbbf14b.1556806084.git.mkubecek@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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, 2 May 2019 16:15:10 +0200 (CEST) Michal Kubecek wrote: > Add new validation flag NL_VALIDATE_NESTED which adds three consistency > checks of NLA_F_NESTED_FLAG: > > - the flag is set on attributes with NLA_NESTED{,_ARRAY} policy > - the flag is not set on attributes with other policies except NLA_UNSPEC > - the flag is set on attribute passed to nla_parse_nested() > > Signed-off-by: Michal Kubecek > > v2: change error messages to mention NLA_F_NESTED explicitly There are some cases where netlink related to IPv4 does not send nested flag. You risk breaking older iproute2 and other tools being used on newer kernel. I.e this patch may break binary compatibility. Have you tried running with this on a very old distro (like Redhat Linux 9)?