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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B103C2D0DB for ; Fri, 31 Jan 2020 20:57:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 279C3214D8 for ; Fri, 31 Jan 2020 20:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580504265; bh=xSaADny3VeFeTtHG/1htvc3v34drLqjFKsbK6AuXjHk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=gTEwN9cZI4EuTZ6pa0kCuKwuQXSZXxKEeqvedgsmBovnvCZspnU4TkTmwE3r5pTMv O4+T6j30WvzXqRug6SMAjCzcGh6Tx4OIkeq7qqRyQbGqMAPLHuq1TWM8rC5JuoEOYW PhCAEsp6NsD9mXbY/iQTLZds8tDGvjrelohgYrsE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726593AbgAaU5o (ORCPT ); Fri, 31 Jan 2020 15:57:44 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:37119 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726105AbgAaU5n (ORCPT ); Fri, 31 Jan 2020 15:57:43 -0500 Received: by mail-lf1-f66.google.com with SMTP id b15so5831697lfc.4 for ; Fri, 31 Jan 2020 12:57:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yIy8jX/bIqNLPn135lJfh03fB0J5DTm/sQQubpuwpIc=; b=T9YJkCW9JbP3I/VrV8Kj+Sqgh32TFui6J89dvvzFWNF4uNBBlwLYLIiloGbloeGdEn +WhsCFna2qbBsj24mHwTYrLs7jNN597VW/cYfZ14T/ucXOrbAuhgBHDPx8ZibV3JpYUn SIOsaSvx7SY3ycO1LVDx3/u1kmOYO3RuQI1m4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yIy8jX/bIqNLPn135lJfh03fB0J5DTm/sQQubpuwpIc=; b=GjzcFmxHZTN9Q+gM4XB2I1+CpRkNO0cuu4P2pjuIw7zh6nRk/tSPgN8eoAewqSKNWb /QEiagxCSLuxiVMRez170zUjFtbiGVeRyqS3XgMfPDtH+KXcSAeQ3NQ92k24DvxahoF6 I5yf7dXhPVLVSxCyJcDj/MpjZViKwrKXEbRzTRkM/OqJiPQw7CrfMkc+mmbKQmDl8hLn ZcN6qBCFm5dG2Jl3RDEB/rlEM8Agqistx7ztU/zYB5YqzEVXomoufTH7CPMylJ3F6+PJ izHUxfjVeVd0VdaSvvykmsuafnwbG3XOji9iN0kNMpWuGGawVzn8j3PH/SSu3CFkguGI 4SBA== X-Gm-Message-State: APjAAAXC6c9txju2Tl8ipTw+006WakJftihGLBYsVykbqld/l5L+GfWL nV9lr0x+Zr3AFdC4OXk2J25EGRSNRHg= X-Google-Smtp-Source: APXvYqz5ETIZml1hntPtulKwo/AO/4d5AXaTVNarGWc15d5PfHPwR42eus5g2Dvzz2fRnPQgh9OPIw== X-Received: by 2002:ac2:5e29:: with SMTP id o9mr6447519lfg.81.1580504260849; Fri, 31 Jan 2020 12:57:40 -0800 (PST) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id w1sm4974124lfe.96.2020.01.31.12.57.39 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 31 Jan 2020 12:57:39 -0800 (PST) Received: by mail-lj1-f176.google.com with SMTP id a13so8476079ljm.10 for ; Fri, 31 Jan 2020 12:57:39 -0800 (PST) X-Received: by 2002:a2e:88c5:: with SMTP id a5mr7089308ljk.201.1580504259100; Fri, 31 Jan 2020 12:57:39 -0800 (PST) MIME-Version: 1.0 References: <000000000000dd68d0059c74a1db@google.com> <000000000000ed3a48059d17277e@google.com> In-Reply-To: <000000000000ed3a48059d17277e@google.com> From: Linus Torvalds Date: Fri, 31 Jan 2020 12:57:23 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: KASAN: slab-out-of-bounds Read in bitmap_ip_add To: Jozsef Kadlecsik Cc: coreteam@netfilter.org, David Miller , Marco Elver , Florian Westphal , Greg Kroah-Hartman , "Enrico Weigelt, metux IT consult" , jeremy@azazel.net, Kate Stewart , Linux Kernel Mailing List , Mark Rutland , Netdev , netfilter-devel@vger.kernel.org, Pablo Neira Ayuso , syzkaller-bugs , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 26, 2020 at 8:01 PM syzbot wrote: > > syzbot has bisected this bug to: Ok, the bisection is obviously bogus - it just points to where the KASAN support was added to _notice_ the problem. But is somebody looking at the actual KASAN report itself? https://syzkaller.appspot.com/bug?extid=f3e96783d74ee8ea9aa3 It does look like nfnetlink_rcv_msg() ends up looking at a bit: bitmap_ip_do_add net/netfilter/ipset/ip_set_bitmap_ip.c:83 [inline] bitmap_ip_add+0xef/0xe60 net/netfilter/ipset/ip_set_bitmap_gen.h:136 bitmap_ip_uadt+0x73e/0xa10 net/netfilter/ipset/ip_set_bitmap_ip.c:186 call_ad+0x1a0/0x5a0 net/netfilter/ipset/ip_set_core.c:1716 ip_set_ad.isra.0+0x572/0xb20 net/netfilter/ipset/ip_set_core.c:1804 ip_set_uadd+0x37/0x50 net/netfilter/ipset/ip_set_core.c:1829 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 that is past the allocation: ip_set_alloc+0x38/0x5e net/netfilter/ipset/ip_set_core.c:255 init_map_ip net/netfilter/ipset/ip_set_bitmap_ip.c:223 [inline] bitmap_ip_create+0x6ec/0xc20 net/netfilter/ipset/ip_set_bitmap_ip.c:327 ip_set_create+0x6f1/0x1500 net/netfilter/ipset/ip_set_core.c:1111 nfnetlink_rcv_msg+0xcf2/0xfb0 net/netfilter/nfnetlink.c:229 Maybe this has already been fixed, but I'm just trying to follow-up on the syzbot report.. Linus