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 B391DC2D0DB for ; Fri, 31 Jan 2020 20:57:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8849F217BA for ; Fri, 31 Jan 2020 20:57:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580504267; bh=xSaADny3VeFeTtHG/1htvc3v34drLqjFKsbK6AuXjHk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=pU8Fs+LF+W4CurvWB1PkAwNRqorDfGhTRugyq3E2nQ5x2IYKdMn6FJGJ/JxobcOL3 sJEliC4Td/1lcb/wQlOojOH4Z3ZzQid49nXHOCqFzpBBbxTo+TwcyEcHkkqjO9bS8H DVZaON+8B87wss711Qd1aVxhkTHGElX9rO3fjO7w= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgAaU5o (ORCPT ); Fri, 31 Jan 2020 15:57:44 -0500 Received: from mail-lf1-f66.google.com ([209.85.167.66]:43284 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726102AbgAaU5n (ORCPT ); Fri, 31 Jan 2020 15:57:43 -0500 Received: by mail-lf1-f66.google.com with SMTP id 9so5797812lfq.10 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=ePTtePClNFiyXngSBdfT5JNHVBrzJ8MWNNGQYgm1wjiPtxgWYdNJQGrse2pCRfgYN/ fFlqrHYzAvlPtwGzc/t8tNgQe65G9NGD1r1/9QAL3YKC6Mg6/+wo1rCfj++DVL+YRzXl lAyNehLVahvNR2KnTRw8JdH5XCqWY2CBtuI5GxovQ/X5fKioogFtOF3iaq2ewrpneeTP FAUSOCFun63R402GS7Vg9w0/ZYWOdb8IvnNEJFx3aw3D6aJH++6NYmYysCNYvfn7Ivrl CGYi0u6Eil5YNUnqFTErVJqNf0xCV4VqYnYokWwe17J4p7gN6B5HLjmpebyJz+Ww2FPe 7egg== X-Gm-Message-State: APjAAAWhQpeFltkKeNkltxEp6al3GVrF2IVJWfiIYJ9A1j0g3vGGh6QW n++B0OBDj9An0jIU3pWi+k+PvEmGWOU= X-Google-Smtp-Source: APXvYqz1KZWCDFzH5gz9eLFp/KFww6xRIlkAC0r+l4ClFXkQfB6z9uOjuxr1Cf67ARAENuXdudcbKQ== X-Received: by 2002:ac2:5e9b:: with SMTP id b27mr6629397lfq.184.1580504260757; Fri, 31 Jan 2020 12:57:40 -0800 (PST) Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com. [209.85.208.177]) by smtp.gmail.com with ESMTPSA id k1sm5195543lji.43.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-f177.google.com with SMTP id w1so8516557ljh.5 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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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