Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp734068ybc; Fri, 22 Nov 2019 12:14:33 -0800 (PST) X-Google-Smtp-Source: APXvYqx1FNA/5t27XajVLHyx0wuXZM/9oGF3udkG8As7GTGjH/jIbq3fk/AUG3SAdPD1iLDHpZI3 X-Received: by 2002:a17:906:5593:: with SMTP id y19mr1464128ejp.237.1574453673331; Fri, 22 Nov 2019 12:14:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574453673; cv=none; d=google.com; s=arc-20160816; b=Tgq6aBYhDlCauDAueWI2rinHFzekh4Sx6ZfsytXSuL8TVyvtQI3m4o5uPjB27UEKuq MEWCISRQs0qg0ZacJpvcGMQD/w8V695Lim0GFTFMyyt25WELC10vbrs93bxbmb4+cmba UManJxexq81nfPS8oBV+N0meltvtdKKwNCuQmjKrRDBvDmQGiPbJOyLOpepeidSBQNE0 nfuOffOufFH1WL1HRyr7T1XYG4mwUr4YlPJ/x5lp7CjzrfMS2IkuE6GxgJyP1Kz8DShC AkIz5pqT+ZqxW7sN+ijt1VXS/52SJ122jbGpuDzQXe1o/8DTP0gU2J9o4+qFrgnMgjZA Gebw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=7Yfs+V4e2aF9N2o1PW3h5eiwT7UaCyKtter0ZlR6Mww=; b=jsftOwV2pgdn3812rg14jU2/J9yLljZ/gRc4nUOEwTN9VO8PfUR72FDThv9lVNN/sJ afG4mjPwOpMf1kxiyZTN3P3W3ZlDEFUoMWlDqABPP//pCOCiB/B5hdzwYB1NRKeGxUdU cvxxrlBoC6L0I/kgqMeP8b9unWHxd8bliA60FBNjOCVlmY/Ks/90gWnwr3+0Z5r2J4i1 zYUIsz/Wx8rG0Epx6l88XW3uc/ENd0l9/KDJVWctrgiGnwDj0QvrDO6ltapWoHanakBt MS6A1lj+4qhmVIRKdRlO6P19cru/OhOn9tG7DaL1GuZCdfnHgJ5lgpkd4gLWZC4obUZj zsAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 24si5522776eje.293.2019.11.22.12.14.08; Fri, 22 Nov 2019 12:14:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfKVUM5 (ORCPT + 99 others); Fri, 22 Nov 2019 15:12:57 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:59902 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726568AbfKVUM4 (ORCPT ); Fri, 22 Nov 2019 15:12:56 -0500 Received: (qmail 7249 invoked by uid 2102); 22 Nov 2019 15:12:55 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 22 Nov 2019 15:12:55 -0500 Date: Fri, 22 Nov 2019 15:12:55 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Oliver Neukum cc: syzbot , , , , , , , Subject: Re: KASAN: use-after-free Read in si470x_int_in_callback (2) In-Reply-To: <1574449256.2659.2.camel@suse.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 Nov 2019, Oliver Neukum wrote: > Am Freitag, den 22.11.2019, 10:35 -0500 schrieb Alan Stern: > > On Fri, 22 Nov 2019, syzbot wrote: > > > > > Hello, > > > > > > syzbot has tested the proposed patch but the reproducer still triggered > > > crash: > > > INFO: rcu detected stall in dummy_timer > > > > > > radio-si470x 1-1:0.0: non-zero urb status (-71) > > > radio-si470x 4-1:0.0: non-zero urb status (-71) > > > radio-si470x 3-1:0.0: non-zero urb status (-71) > > > > Oliver: > > > > The reason for this stall is because the driver goes into a tight > > resubmit loop when the interrupt URB completes with an unrecognized > > error status. Instead, the driver should log an error message and > > avoid resubmitting. Error recovery can be done at a higher level. > > > > In other words, change the > > > > goto resubmit; /* Maybe we can recover. */ > > > > line in the completion handler into a return. (I guess you also should clear the int_in_running flag, although the callback routine doesn't do that in the case of -ENOENT, -ECONNRESET, or -ESHUTDOWN.) > > I thought so, too. That is why I poisoned the URB. Am I dense? Poisoning the URB should work -- if you do it in the right place. The probe routine might not be good enough; an unrecognized error can occur after the probe has succeeded. Did you modify si470x_int_in_callback()? That's where the tight loop is. Alan Stern