On Mon, Dec 09, 2019 at 12:26:04PM +0000, Lee Jones wrote: > On Wed, 20 Nov 2019, Oliver Neukum wrote: > > > #syz test: https://github.com/google/kasan.git b1aa9d83 > > > > From 6f3de1e2c53fcee54d90a6891df9cea763eca86b Mon Sep 17 00:00:00 2001 > > From: Oliver Neukum <oneukum@xxxxxxxx> > > Date: Wed, 20 Nov 2019 16:15:13 +0100 > > Subject: [PATCH] mfd: dln2: more sanity checking for endpoints > > > > It is not enough to check for the number of endpoints. > > The types must also be correct. > > > > Reported-by: syzbot+48a2851be24583b864dc@xxxxxxxxxxxxxxxxxxxxxxxxx > > Signed-off-by: Oliver Neukum <oneukum@xxxxxxxx> > > --- > > drivers/mfd/dln2.c | 13 +++++++++++-- > > 1 file changed, 11 insertions(+), 2 deletions(-) > > Looks okay in principle. > > It would be great if one of the USB guys could take a quick look. > > Is this not something that could be done at a subsystem level? We have functions in the USB core for this, look at usb_find_common_endpoints() for an example of this. You can convert the driver to use this, or use the usb helper functions that Oliver is using here in a much simpler patch :) thanks, greg k-h