Module Name: src Committed By: maxv Date: Thu Aug 23 11:53:15 UTC 2018
Modified Files: src/sys/dev/pci: if_msk.c Log Message: Fix buffer overflow, detected by kASan. [ 1.044878] kASan: Unauthorized Access In 0xffffffff804ec7e2: Addr 0xffffffff818a51e4 [2 bytes, read] [ 1.044878] #0 0xffffffff804ec7e2 in mskc_probe <netbsd> [ 1.044878] #1 0xffffffff80e92a77 in mapply <netbsd> [ 1.044878] #2 0xffffffff80e92e5f in config_search_loc <netbsd> [ 1.044878] #3 0xffffffff80e93fb5 in config_found_sm_loc <netbsd> [ 1.044878] #4 0xffffffff802ca9ea in pci_probe_device <netbsd> [ 1.044878] #5 0xffffffff802cad97 in pci_enumerate_bus <netbsd> [ 1.044878] #6 0xffffffff802caf00 in pcirescan <netbsd> [ 1.044878] #7 0xffffffff802cb1ee in pciattach <netbsd> [ 1.044878] #8 0xffffffff80e93e5b in config_attach_loc <netbsd> [ 1.044878] #9 0xffffffff80e93fce in config_found_sm_loc <netbsd> [ 1.044878] #10 0xffffffff80271212 in mp_pci_scan <netbsd> [ 1.044878] #11 0xffffffff8022d9ee in mainbus_attach <netbsd> [ 1.044878] #12 0xffffffff80e93e5b in config_attach_loc <netbsd> [ 1.044878] #13 0xffffffff8021e38b in cpu_configure <netbsd> [ 1.044878] #14 0xffffffff814a7068 in main <netbsd> To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/if_msk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/if_msk.c diff -u src/sys/dev/pci/if_msk.c:1.75 src/sys/dev/pci/if_msk.c:1.76 --- src/sys/dev/pci/if_msk.c:1.75 Tue Jul 10 20:48:54 2018 +++ src/sys/dev/pci/if_msk.c Thu Aug 23 11:53:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_msk.c,v 1.75 2018/07/10 20:48:54 jdolecek Exp $ */ +/* $NetBSD: if_msk.c,v 1.76 2018/08/23 11:53:15 maxv Exp $ */ /* $OpenBSD: if_msk.c,v 1.79 2009/10/15 17:54:56 deraadt Exp $ */ /* @@ -52,7 +52,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.75 2018/07/10 20:48:54 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.76 2018/08/23 11:53:15 maxv Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -195,7 +195,8 @@ static const struct msk_product { { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_YUKON_C036 }, { PCI_VENDOR_MARVELL, PCI_PRODUCT_MARVELL_YUKON_C042 }, { PCI_VENDOR_SCHNEIDERKOCH, PCI_PRODUCT_SCHNEIDERKOCH_SK_9SXX }, - { PCI_VENDOR_SCHNEIDERKOCH, PCI_PRODUCT_SCHNEIDERKOCH_SK_9E21 } + { PCI_VENDOR_SCHNEIDERKOCH, PCI_PRODUCT_SCHNEIDERKOCH_SK_9E21 }, + { 0, 0 } }; static inline u_int32_t