Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4660562pxk; Wed, 30 Sep 2020 08:31:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Jv7igGgT+qsA2hYC2BIwf/DXA4tvx9VGnFMwp20JuX8+VAO7X58TgzFoiaeLOn6pJunn X-Received: by 2002:a17:906:f950:: with SMTP id ld16mr3264325ejb.489.1601479903765; Wed, 30 Sep 2020 08:31:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601479903; cv=none; d=google.com; s=arc-20160816; b=v5D2sp+9cBkmB8YQO3S9ewwKPJ9gZ3XQbiQHDT4wJPa1TpEbmmEPc/vKZSp8H9Upmr J81zVhM2Lx3YI0zX5j3DwZQFr5WT5naYaNBii0jS44X2RAo40s1GIKpEHyqOQkgOAgyz NlRmIgM8yPmyceaxBDWD1ngTy7pouxqNUPiz7AT1IRw3yXbVEVJV726RkkVZzhHWJQuo jShZMfXtM704KOgSkcW0qJyduw34KuI86l9G3Vdw+kIqU7vE/X3m3JdfB+KvxiDyzgx3 ZqOr007HlcE1Pwb5OY756ysdrSEmxigQLZdwF4jkGhcfE2Dkgvr7B/SV985CehJG6psR HThg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=aqZau5xYcLfz7fU6kWPWcUxXzOYMn4YTVPKLqoPQKaY=; b=nfMeknLwvq/aX+B2UjVHRSzERtZHGbefMLoFDTlRafOx2LIwj1Q8DYLF+Gqf56HR05 0X68DyAPBnNGcK6BRzHi7DmIFbtjX2Sd7/fMbEtZsb1CP1I3+i68IbBV5HGUj/Nc58f9 FKxsQlsAKw/wamHMsGzM49f3vI1zkfZettfC3SoZA1Y3RuTVu2EpC3orZZ54+oMAiX1A WU6kDSUAfwdA/UJxj+bs4yxpeEVWPZvMPhCmSOfadumyXhn2tygGP1JVZvSYUwLUBzfd 464Zo6cO1zh4bu5arGtfYC3j/yf7iQ86T5OJm8YYDave8ik6gtV0zqWP2WKXW1zOqW9Q IDog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fC9bWFoE; dkim=neutral (no key) header.i=@linutronix.de header.b=WRJ8lzbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si1288727ejd.398.2020.09.30.08.31.21; Wed, 30 Sep 2020 08:31:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fC9bWFoE; dkim=neutral (no key) header.i=@linutronix.de header.b=WRJ8lzbK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731119AbgI3P3q (ORCPT + 99 others); Wed, 30 Sep 2020 11:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731010AbgI3P3o (ORCPT ); Wed, 30 Sep 2020 11:29:44 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C623C061755 for ; Wed, 30 Sep 2020 08:29:44 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601479781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aqZau5xYcLfz7fU6kWPWcUxXzOYMn4YTVPKLqoPQKaY=; b=fC9bWFoE1/eG/uG47jmppe9UycpzJfawCIUeh06a6YZbeslJwiHmJp1L5pQFxneWoDVeI2 b0iFw0DfB4SP31ej0/wjpjX07O7+H7hhTYERNNgNBdM/DJKhLgP3L6tXl1kYwfXtniVwvx GCfjWUZsJJjrQxaxfPCRwC4b3RWDYPdDtNYJEsOM6Li9lkZg59Wq30CqCfUXHmXHOKba29 /ZGOuA8Jun2KFV67EZn5T4R1fWMeNALFR7iEX97fJfH1V+6zjAuv0OGXw1icrd5DpxrUMT UysUUPquljDDnILpx2jORVm2BKGZbxH1eqeC/Vlz/O9B8xn82Q1rCc9B1oXfLQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601479781; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aqZau5xYcLfz7fU6kWPWcUxXzOYMn4YTVPKLqoPQKaY=; b=WRJ8lzbKXtdFgjF58fjm4nGD/pJNjZ042WFzkiYHsftWabD/dNyRXEBhWXIVTsNMsuG3Q6 umneCJHc1w51WwCA== To: Walter Wu , Andrew Morton , John Stultz , Stephen Boyd , Tejun Heo , Lai Jiangshan , Marco Elver , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , Andrey Konovalov , Matthias Brugger Cc: kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wsd_upstream , linux-mediatek@lists.infradead.org, Walter Wu Subject: Re: [PATCH v4 0/6] kasan: add workqueue and timer stack for generic KASAN In-Reply-To: <20200924040152.30851-1-walter-zh.wu@mediatek.com> References: <20200924040152.30851-1-walter-zh.wu@mediatek.com> Date: Wed, 30 Sep 2020 17:29:40 +0200 Message-ID: <87h7rfi8pn.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 24 2020 at 12:01, Walter Wu wrote: > Syzbot reports many UAF issues for workqueue or timer, see [1] and [2]. > In some of these access/allocation happened in process_one_work(), > we see the free stack is useless in KASAN report, it doesn't help > programmers to solve UAF on workqueue. The same may stand for times. > > This patchset improves KASAN reports by making them to have workqueue > queueing stack and timer stack information. It is useful for programmers > to solve use-after-free or double-free memory issue. > > Generic KASAN also records the last two workqueue and timer stacks and > prints them in KASAN report. It is only suitable for generic KASAN. > > [1]https://groups.google.com/g/syzkaller-bugs/search?q=%22use-after-free%22+process_one_work > [2]https://groups.google.com/g/syzkaller-bugs/search?q=%22use-after-free%22%20expire_timers How are these links useful for people who do not have a gurgle account?