Thread (4 messages) flat view 4 messages, 2 authors, 2022-03-26

Re: [syzbot] KMSAN: uninit-value in ax88179_led_setting

From: Pavel Skripkin <hidden>
Date: 2022-03-26 12:43:56
Also in: linux-usb, lkml

Hi David,

On 3/26/22 14:47, David Kahurani wrote:
quoted
Signed-off-by: David Kahurani <redacted>
Reported-by: syzbot+d3dbdf31fbe9d8f5f311@syzkaller.appspotmail.com
---
 drivers/net/usb/ax88179_178a.c | 181 +++++++++++++++++++++++++++------
 1 file changed, 152 insertions(+), 29 deletions(-)
diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index a31098981..932e21a65 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -224,9 +224,12 @@ static int __ax88179_write_cmd(struct usbnet *dev, u8 cmd, u16 value, u16 index,
  ret = fn(dev, cmd, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
  value, index, data, size);
You've changed __ax88179_write_cmd(), but not __ax88179_read_cmd(). I've 
missed it. Changing  __ax88179_write_cmd() does not help with uninit 
value bugs

Also I believe, __ax88179_read_cmd() should have __must_check annotation 
too, since problem came from it in the first place (I mean after added 
sane error handling inside it)

Next thing is ax88179_read_cmd_nopm() still prone to uninit value bugs, 
since it touches uninitialized `buf` in case of __ax88179_read_cmd() 
error...



I remembered why I gave up on fixing this driver... I hope, you have 
more free time and motivation :)




With regards,
Pavel Skripkin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help