Coverity-updates archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

New Defects reported by Coverity Scan for NetBSD-amd64-kernel



Hi,

Please find the latest report on new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.

2 new defect(s) introduced to NetBSD-amd64-kernel found with Coverity Scan.
2 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1351174:  Memory - corruptions  (OVERRUN)
/sys/fs/msdosfs/msdosfs_conv.c: 1613 in win2unixfn()


________________________________________________________________________________________________________
*** CID 1351174:  Memory - corruptions  (OVERRUN)
/sys/fs/msdosfs/msdosfs_conv.c: 1613 in win2unixfn()
1607     	 * files using the same (truncated) name.
1608     	 */
1609     	*namlen += len;
1610     	if (*namlen > sizeof(dp->d_name) - 1)
1611     		*namlen = sizeof(dp->d_name) - 1;
1612     	memmove(&dp->d_name[len], &dp->d_name[0], *namlen - len);
>>>     CID 1351174:  Memory - corruptions  (OVERRUN)
>>>     Overrunning array "buf" of 39 bytes by passing it to a function which accesses it at byte offset 510 using argument "len" (which evaluates to 511).
1613     	memcpy(dp->d_name, buf, len);
1614     
1615     #ifdef __NetBSD__
1616     	dp->d_namlen = *namlen;
1617     #endif
1618     

** CID 1351402:  Error handling issues  (CHECKED_RETURN)
/sys/arch/x86/x86/efi.c: 78 in efi_getva()


________________________________________________________________________________________________________
*** CID 1351402:  Error handling issues  (CHECKED_RETURN)
/sys/arch/x86/x86/efi.c: 78 in efi_getva()
72     vaddr_t
73     efi_getva(paddr_t pa)
74     {
75     	vaddr_t va;
76     
77     #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
>>>     CID 1351402:  Error handling issues  (CHECKED_RETURN)
>>>     Calling "mm_md_direct_mapped_phys" without checking return value (as is done elsewhere 5 out of 6 times).
78     	mm_md_direct_mapped_phys(pa, &va);
79     #else
80     	/* XXX This code path is not tested. */
81     	va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
82     	    UVM_KMF_VAONLY | UVM_KMF_WAITVA);
83     	if (va == 0) {


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/netbsd-amd64-kernel?tab=overview

To manage Coverity Scan email notifications for "coverity-updates%netbsd.org@localhost", click https://scan.coverity.com/subscriptions/edit?email=coverity-updates%40netbsd.org&token=487286ca1a9a4f4bd485d16f66b5e782



Home | Main Index | Thread Index | Old Index