Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb rum(4): Avoid uninitialized garbage in failed re...
details: https://anonhg.NetBSD.org/src/rev/a282534b8a72
branches: trunk
changeset: 368919:a282534b8a72
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Aug 12 19:13:36 2022 +0000
description:
rum(4): Avoid uninitialized garbage in failed register read.
Reported-by: syzbot+f2cba71b1b1bc91029b3%syzkaller.appspotmail.com@localhost
https://syzkaller.appspot.com/bug?id=7a01863d0fe34a4946516388c436991ba2beaa63
diffstat:
sys/dev/usb/if_rum.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r a6e2fdbb25ba -r a282534b8a72 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c Fri Aug 12 17:06:01 2022 +0000
+++ b/sys/dev/usb/if_rum.c Fri Aug 12 19:13:36 2022 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
-/* $NetBSD: if_rum.c,v 1.69 2020/03/15 23:04:50 thorpej Exp $ */
+/* $NetBSD: if_rum.c,v 1.70 2022/08/12 19:13:36 riastradh Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini%free.fr@localhost>
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.69 2020/03/15 23:04:50 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.70 2022/08/12 19:13:36 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1407,6 +1407,7 @@
if (error != 0) {
printf("%s: could not read EEPROM: %s\n",
device_xname(sc->sc_dev), usbd_errstr(error));
+ memset(buf, 0, len);
}
}
@@ -1436,6 +1437,7 @@
if (error != 0) {
printf("%s: could not multi read MAC register: %s\n",
device_xname(sc->sc_dev), usbd_errstr(error));
+ memset(buf, 0, len);
}
}
Home |
Main Index |
Thread Index |
Old Index