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=-5.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 90853C10DCE for ; Tue, 10 Mar 2020 22:02:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CDEF21927 for ; Tue, 10 Mar 2020 22:02:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dP0qwPIo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727761AbgCJWCr (ORCPT ); Tue, 10 Mar 2020 18:02:47 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:45737 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgCJWCp (ORCPT ); Tue, 10 Mar 2020 18:02:45 -0400 Received: by mail-ot1-f66.google.com with SMTP id f21so14750047otp.12; Tue, 10 Mar 2020 15:02:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SF/rLdHGOUkZmCUHks4hnv/hgG7mXzY0mjAu3eORSKc=; b=dP0qwPIoqktkEhRgFZTVTTWxkcFRfYDGvzuin4BmCyx1dFeyQ0uOwyb4eBHicOUILm DI3VMZq1rLcTrvMuznKSlRjP7zuiHhlLoneeAP2Ukbu89NsY5cjbW5zupm8KmYjnPOQC PhyMikcYH7oAz4FvqHke97OV+X/SBipPp1vmICbL+MLCxrA9ighbLPrG6XKNtMJfpKKl OSmo7GIymlx5q2EcDMB1TCAheYxf6xqD7Pwng4RkPs8Zy8Esc+4aTjqft250RJeGUwcz VTG6cyYyRJg83R8lsAHOiWf8xK6gxrrkg9NP8zaiqd+XvIp5Gx+JaBnF6WdRX6NPXNaV GR4w== 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=SF/rLdHGOUkZmCUHks4hnv/hgG7mXzY0mjAu3eORSKc=; b=iXpcxP4ZtSotvmhH/6V4tv86MDBDMbyVRa/Ba1KXgGsOpqOnqGdreHTqHNeatAH6rq bZ1kopUp8iVJZB4QAeRn8yH3sRz0pZsb8kOc/SYjnnzwlhZvS+MKdyAjoVdFAV5GfnfO OsJ/O9/gB78doGEf4IbMgYvoLG2cV2pQR8MWVEqmtZLHZqs1tFztXJQTjAtXWuOwj2Dg Q7P3TFes+TrYTsaAErv9oA2901HFn7bPb0QFK7500ARDAyWtRhU0gJFYRuziztj2qY+J adoKVca45bvadmAoobycWjft+zsGMAb6vqHUqKJKt6hzESyhpoWr4hxgzv/fgp0xCLZK 9DpA== X-Gm-Message-State: ANhLgQ0YU7H26zFqEucBI5rcekY3iS+ECKQjEVp40FvfASAFGq5W1R4p o/Mth7S576Sm87n4zYtg+6iypyPUK5gbz+Ryl7k= X-Google-Smtp-Source: ADFU+vueS+uiLnK7xdhsPHDa9dL2BYINp7cvAGX4mf8Z/DEw5HjuYJXCQGm60Z4IpnUSa5E1ExpmM2OF+ASb4BYIOrM= X-Received: by 2002:a9d:4702:: with SMTP id a2mr18202147otf.319.1583877763719; Tue, 10 Mar 2020 15:02:43 -0700 (PDT) MIME-Version: 1.0 References: <00000000000034513e05a05cfc23@google.com> <635ab023-d180-7ddf-a280-78080040512c@gmail.com> In-Reply-To: <635ab023-d180-7ddf-a280-78080040512c@gmail.com> From: Cong Wang Date: Tue, 10 Mar 2020 15:02:32 -0700 Message-ID: Subject: Re: KASAN: invalid-free in tcf_exts_destroy To: Eric Dumazet Cc: syzbot , David Miller , Jamal Hadi Salim , Jiri Pirko , Jakub Kicinski , LKML , Linux Kernel Network Developers , syzkaller-bugs 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 Tue, Mar 10, 2020 at 1:36 PM Eric Dumazet wrote: > > > > On 3/10/20 11:33 AM, Cong Wang wrote: > > On Sun, Mar 8, 2020 at 12:35 PM syzbot > > wrote: > >> > >> Hello, > >> > >> syzbot found the following crash on: > >> > >> HEAD commit: c2003765 Merge tag 'io_uring-5.6-2020-03-07' of git://git... > >> git tree: upstream > >> console output: https://syzkaller.appspot.com/x/log.txt?x=10cd2ae3e00000 > >> kernel config: https://syzkaller.appspot.com/x/.config?x=4527d1e2fb19fd5c > >> dashboard link: https://syzkaller.appspot.com/bug?extid=dcc34d54d68ef7d2d53d > >> compiler: gcc (GCC) 9.0.0 20181231 (experimental) > >> userspace arch: i386 > >> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1561b01de00000 > >> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15aad2f9e00000 > >> > >> The bug was bisected to: > >> > >> commit 599be01ee567b61f4471ee8078870847d0a11e8e > >> Author: Cong Wang > >> Date: Mon Feb 3 05:14:35 2020 +0000 > >> > >> net_sched: fix an OOB access in cls_tcindex > >> > >> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10a275fde00000 > >> final crash: https://syzkaller.appspot.com/x/report.txt?x=12a275fde00000 > >> console output: https://syzkaller.appspot.com/x/log.txt?x=14a275fde00000 > >> > >> IMPORTANT: if you fix the bug, please add the following tag to the commit: > >> Reported-by: syzbot+dcc34d54d68ef7d2d53d@syzkaller.appspotmail.com > >> Fixes: 599be01ee567 ("net_sched: fix an OOB access in cls_tcindex") > >> > >> IPVS: ftp: loaded support on port[0] = 21 > >> ================================================================== > >> BUG: KASAN: double-free or invalid-free in tcf_exts_destroy+0x62/0xc0 net/sched/cls_api.c:3002 > >> > >> CPU: 1 PID: 9507 Comm: syz-executor467 Not tainted 5.6.0-rc4-syzkaller #0 > >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 > >> Call Trace: > >> __dump_stack lib/dump_stack.c:77 [inline] > >> dump_stack+0x188/0x20d lib/dump_stack.c:118 > >> print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:374 > >> kasan_report_invalid_free+0x61/0xa0 mm/kasan/report.c:468 > >> __kasan_slab_free+0x129/0x140 mm/kasan/common.c:455 > >> __cache_free mm/slab.c:3426 [inline] > >> kfree+0x109/0x2b0 mm/slab.c:3757 > >> tcf_exts_destroy+0x62/0xc0 net/sched/cls_api.c:3002 > >> tcf_exts_change+0xf4/0x150 net/sched/cls_api.c:3059 > >> tcindex_set_parms+0xed8/0x1a00 net/sched/cls_tcindex.c:456 > > > > Looks like a consequence of "slab-out-of-bounds Write in tcindex_set_parms". > > > > Thanks. > > > > I have a dozen more syzbot reports involving net/sched code, do you want > me to release them right now ? I have no problem with this, at least I can close them as dup etc.. Please go ahead. Thanks.