Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp590195pxb; Tue, 15 Feb 2022 23:04:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9RTGaWsTpgM0Jwh61JnXXL/VulUrrZgP3CUawV5RLacbA7cT9jqq1MzNS6Lh7FUfEUfu2 X-Received: by 2002:a17:90b:e08:b0:1b9:bf28:7533 with SMTP id ge8-20020a17090b0e0800b001b9bf287533mr191085pjb.211.1644995066101; Tue, 15 Feb 2022 23:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995066; cv=none; d=google.com; s=arc-20160816; b=Kz03/kW46cl462xnl0hU5swwBj/96LLlhM0Y7BvhrlB3giRwG2MMQV6IFtAQ8M8Ajw wzA+IZJ0i3OiGo1tuqICTLVwk1iFZEdxHiwPr+XAGrWv1n8ESe4b+mdmr6HEmM7Jibrn SPj6NkATcYWYff6UiGGqu+get+GJKWLR63Z8GSFTJHtQxHRwJMiH0UlitAJx3h5URXuu sF3pPGUraE/bBwwOVE5GbKQsBxRpCAf8I/H7sbgVPdl77lUW6PuLNF43nV6XhXGsMhX/ v0c8CSFEcNPaawyfV+16jLs8rn0/qijskDfA/hcJnAtGaxqhaLWLTLhJP+9tp5SwDFv/ 9tNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/k2GIivlZAYSXRNIeqS36LGVGK2dubipw8sDLnURaqI=; b=HYqbWlwQM5XLQ3J9J1m7mziOqb/OIr9ZkRZcbOJ+3gZKQhkhikw/anRUXoIWqHamQm 4s3gXAgvFFArOCbRowKV2wGFmjfheQTJfthlnHqPl/gNYCx+oZUpYeM0HPSbJebwnFTZ fdSVTRG2z1py6bdMeC3cFcnhMW3JrJiWD9hO5HyKgTSgDUCf1BBZJHGhZZzc7v2+2YYX NCg3OlhIAA1XN5wARw0vE+FNCMkuSUsU9i9K3ohM1XzXpG9yQIvX07JB9LyqH2QdpXlY zbA8HruTstsmY9EWEe3WU7YxSm+XACD/jGid2kYraZL7fpZe6u2HjvOkQfZGP0G5hUwq O7Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l0mtlzEm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h19si4913539pgj.590.2022.02.15.23.04.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:04:26 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=l0mtlzEm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DB96E13E93; Tue, 15 Feb 2022 22:41:55 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244457AbiBOWJ0 (ORCPT + 99 others); Tue, 15 Feb 2022 17:09:26 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:48550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235480AbiBOWJZ (ORCPT ); Tue, 15 Feb 2022 17:09:25 -0500 Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::226]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3F823BC0; Tue, 15 Feb 2022 14:09:13 -0800 (PST) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id F3AB6C0007; Tue, 15 Feb 2022 22:09:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1644962952; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/k2GIivlZAYSXRNIeqS36LGVGK2dubipw8sDLnURaqI=; b=l0mtlzEmBUvB3i5I9/gQY+FnjB5QH9PSiWFy+1w2V8zUuANxPmy3UxDHMnrPzqZgscxBBV qN8IzCV814yubkbuxCnT+E72iSvJUF3gP+OUmyjcbbHr94/c7otZJCDftZZfoHZNlDDInA uQBleDsSPECvv5VTcBeVVqKt//H1JpfB6qLbBgli5bbw/lUlH0b3EFZ3p+ZhpZ9pwTUC20 S0MdnmCQH4UX2UTlNtD7y9jbeBACt7IxEgTbCw5VliwD9sIWdFgQno9AU5Xpt+wGPwJLd8 D/Z6WaGiWtAxpW9Wk2U+YQkUCWtwdxiH0z1UUIs+19gOTYU3/pzjPO+sOZqj+A== From: Alexandre Belloni To: Alessandro Zummo , Vincent Whitchurch Cc: Alexandre Belloni , kernel@axis.com, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rtc: fix use-after-free on device removal Date: Tue, 15 Feb 2022 23:09:11 +0100 Message-Id: <164496294249.63790.9626913004798028224.b4-ty@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20211210160951.7718-1-vincent.whitchurch@axis.com> References: <20211210160951.7718-1-vincent.whitchurch@axis.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 10 Dec 2021 17:09:51 +0100, Vincent Whitchurch wrote: > If the irqwork is still scheduled or running while the RTC device is > removed, a use-after-free occurs in rtc_timer_do_work(). Cleanup the > timerqueue and ensure the work is stopped to fix this. > > BUG: KASAN: use-after-free in mutex_lock+0x94/0x110 > Write of size 8 at addr ffffff801d846338 by task kworker/3:1/41 > > [...] Applied, thanks! [1/1] rtc: fix use-after-free on device removal commit: c8fa17d9f08a448184f03d352145099b5beb618e Best regards, -- Alexandre Belloni