Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1337112rdg; Fri, 13 Oct 2023 20:14:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsM3KmF0A4rJimxiqzSG4oO1e0XdRQp3EsxB20n5Zb/5mmKO3rwift7b/u0Dln4NzrqEVD X-Received: by 2002:a05:6808:29a:b0:3a7:39f6:3f2c with SMTP id z26-20020a056808029a00b003a739f63f2cmr31947161oic.55.1697253252088; Fri, 13 Oct 2023 20:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697253252; cv=none; d=google.com; s=arc-20160816; b=se9NViw/tM4OYc6ZLQ0nhD8MDzVeBHrc3Lcv0SBXdeO9YuSlcA4p5Sf39bn5AXOe07 jQGqGheAZxGdZQoqaWzFIjAF2PUznfRHc/pazOtolocn9mMqUZyZbOHVV9kdlpHF7SeH rkQzwpshgvyMttFaURQQdvg/OhoIDR7R+NaUnmR/hr54oRFnBi6/LZr4xDgj5Rl2dCL1 f75qggi0e/GQckcZgY4JZxyT6AZ8/W8PjxNprSRfIKC8xWCngWodNDDwTuVVY+vXibCi 1WCyXMw2xy4fMFaN80QYdR8rtPNMB4SFkC6cjStZi+Jd1M5pf2FT81sAvZ14ExTQgzpo oNfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gZR9GQ4UrQVETczfpFoA5oUJZGuPlJ1DionOkWcaQtk=; fh=Jgbq5QlzcWQ/IWNKgD0qWaX7QJAEDtPVW2qWKvNQcyY=; b=tR7DA2/rIOCAeuTtrrjaawcGMx+WpB5E9O+fSh0SjO+8QoSG3aaj1sd5GnDtbaIYo4 +Hp5nVqGszs1mp9jQaYbNKuWd/se1y/IFgZ3ewscmSrhrSjg2SzAN5YvaURo8fc1+Dm+ MZ/NqoAL/BVZQKu6LcMMc7VW1UoPg4Kg6fDUp7P08ckSWpwVj5okqUtl/eb+ntBE66Iy EibuIgbP7UiXrto4Z2JWXQz5nZWGCUZxbcVrtpT9SiOgcNGUycsCB3vK5HzmK0uGbpK2 zdxlXg5CFMPajyaK2CC3/RTbrCHB3r/lHPFw8q7ORmAUt7UAKR43iz3augaj3tdnF1go +bXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=E+UQMkxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 4-20020a631444000000b005774978dd75si5991074pgu.175.2023.10.13.20.14.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 20:14:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=E+UQMkxq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6975F8099240; Fri, 13 Oct 2023 20:13:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232786AbjJNDNW (ORCPT + 99 others); Fri, 13 Oct 2023 23:13:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231469AbjJNDNU (ORCPT ); Fri, 13 Oct 2023 23:13:20 -0400 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95A61BF; Fri, 13 Oct 2023 20:13:19 -0700 (PDT) Received: by mail-il1-x133.google.com with SMTP id e9e14a558f8ab-3514bf96fd2so10458845ab.0; Fri, 13 Oct 2023 20:13:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697253199; x=1697857999; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=gZR9GQ4UrQVETczfpFoA5oUJZGuPlJ1DionOkWcaQtk=; b=E+UQMkxq4S2q8iDp+M69yYUIRhfG9s11dQp+w6gRT29teVC/OzSTBhq9eZ1VXXrG3U Ht6goN8diPY3h+wmKq9Af4jU9kBI2C+F/pGHtz60ja7ymKVd6avE6oTBFAEvYltSn2Q6 jjT3+9mlx8YV+ZCTRsRpB9gpGdSUr71ykImJT4qI18PxpZB17A4bhdmUMQ8oMfFzPNxH Gm3oxLEY6ZVlLGYB4nBqwXDwRbLdYzPZg1nnazyRQIqV6nI6wL2hM5NESRK4NmKB7kQ8 P2gcCdZFmTpAKryy2T2NbdTqEozmotPvb3I76OIOIfB30Qfa3GI+S2aEbX+YLhfw38a8 sN2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697253199; x=1697857999; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=gZR9GQ4UrQVETczfpFoA5oUJZGuPlJ1DionOkWcaQtk=; b=Kvv3funiqW5gfcRoKcPbU8SS1dkvXxJXA1Yqi0nhypgQLZpmrTOUHFOZE6qiD/rBvk I7RZ0d98jsPWRi9iJFCJX3FzIxZ1KQuGU1tUVSv3ktLuvGNeJkliEFgWZOZszeyDUDs/ BWWI7nZUDC31ceyqXIZ/WbBSl/wOP+jzJyJHnKin5gk7JHHLpcUqivb9AFrqUHjiGl/L mI6VwM63Qy9EZCIBNJxkcWI80WAtLMecPvCMLkKWh+d0INQz/rPX/JUWfgt4RgX1SJEv hG0EjfQZA3x5ZvSOMagAGluScizdqMNm4jMG3Haks+hn2U6k+Z+G3TgkH9DXWhSBhFKN 4mfA== X-Gm-Message-State: AOJu0YyLy2EXvtTFbMM/oVb67KikLOi8BbZMHmAukK9b3NjlW6YUJx8S OVM9Ta3cTvmY9vyJMRqMRgU= X-Received: by 2002:a05:6e02:f45:b0:357:478f:a744 with SMTP id y5-20020a056e020f4500b00357478fa744mr10335334ilj.10.1697253198835; Fri, 13 Oct 2023 20:13:18 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:469c:3411:2771:1b7f]) by smtp.gmail.com with ESMTPSA id bf6-20020a17090b0b0600b00274b9dd8519sm771138pjb.35.2023.10.13.20.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 20:13:18 -0700 (PDT) Date: Fri, 13 Oct 2023 20:13:16 -0700 From: Dmitry Torokhov To: Javier Carrasco Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+0434ac83f907a1dbdd1e@syzkaller.appspotmail.com Subject: Re: [PATCH v3] Input: powermate - fix use-after-free in powermate_config_complete Message-ID: References: <20230916-topic-powermate_use_after_free-v3-1-64412b81a7a2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230916-topic-powermate_use_after_free-v3-1-64412b81a7a2@gmail.com> X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 13 Oct 2023 20:13:30 -0700 (PDT) On Wed, Oct 04, 2023 at 04:36:13PM +0200, Javier Carrasco wrote: > syzbot has found a use-after-free bug [1] in the powermate driver. This > happens when the device is disconnected, which leads to a memory free > from the powermate_device struct. > When an asynchronous control message completes after the kfree and its > callback is invoked, the lock does not exist anymore and hence the bug. > > Use usb_kill_urb() on pm->config to cancel any in-progress requests upon > device disconnection. > > [1] https://syzkaller.appspot.com/bug?extid=0434ac83f907a1dbdd1e > > Signed-off-by: Javier Carrasco > Reported-by: syzbot+0434ac83f907a1dbdd1e@syzkaller.appspotmail.com Applied, thank you. -- Dmitry