[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1810191004.16066868.1537901713871.JavaMail.zimbra@redhat.com>
Date: Tue, 25 Sep 2018 14:55:13 -0400 (EDT)
From: Vladis Dronov <vdronov@...hat.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Andrey Konovalov <andreyknvl@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Oliver Neukum <oneukum@...e.com>,
Hans de Goede <hdegoede@...hat.com>,
syzkaller <syzkaller@...glegroups.com>,
USB list <linux-usb@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
stable <stable@...r.kernel.org>
Subject: Re: [PATCH] usb: usbfs: fix crash in
check_ctrlrecip()->usb_find_alt_setting()
Hello, Alan, Andrey, all,
> > > (You'll be lucky if Linus doesn't see that. He yells at anybody who
> > > suggests adding BUG_ON for anything that doesn't completely crash
Now, may be not )
> > > How is this different from calling kfree() with a NULL argument?
It is not, it is the same case.
> > What about adding a WARN_ON()? It doesn't crash the kernel and it will
> > be detected and reported by syzbot.
Yes, that would be a great solution.
> Sure, we could do that. But would be the point?
We know when usb_find_alt_setting() callers do smth weird and go fix them.
> After c9a4cb204e9e, calling usb_find_alt_setting() with a NULL config is
> no more of a bug than calling kfree() with a NULL pointer.
Yes, exactly.
> You wouldn't want to put a WARN_ON in kfree(), would you?
Honestly, in the ideal world I would, again, to be aware when some code does
something weird so we know about it. But this world is this world, it needs
more performance to the throne of performance.
I have no other arguments except the above, please, feel free to not to accept
my patch.
Best regards,
Vladis Dronov | Red Hat, Inc. | Product Security Engineer
Powered by blists - more mailing lists