Re: [CHECKER] 120 potential dereference to invalid pointers errors for linux 2.4.1

From: Mitchell Blank Jr (mitch@sfgoth.com)
Date: Sat Mar 17 2001 - 07:31:54 EST


Junfeng Yang wrote:
> [BUG] fore200e_kmalloc can return NULL
> /u2/acc/oses/linux/2.4.1/drivers/atm/fore200e.c:2032:fore200e_get_esi: ERROR:NULL:2020:2032: Using unknown ptr "prom" illegally! set by 'fore200e_kmalloc':2020

I don't see the bug - there is an explicit "if(!prom) return -ENOMEM;" after
the allocation. It looks fine to me.

> [BUG] break the while loop, but not the for loop
> /u2/acc/oses/linux/2.4.1/drivers/atm/zatm.c:1817:zatm_detect: ERROR:NULL:1804:1817: Using NULL ptr "zatm_dev" illegally! set by 'kmalloc':1804

Ah, good catch. It'd be almost impossible to actually trigger this since
you'd need multiple cards of different types (all of which are rare) and
end up with really bad allocation luck, but it is technically a bug.
Really line 1829 should be "if(!zatm_dev) return devs;"

> [BUG] at line 1796
> /u2/acc/oses/linux/2.4.1/net/atm/lec.c:1799:lec_arp_update: ERROR:NULL:1798:1799: Using unknown ptr "entry" illegally! set by 'make_entry':1798

Yep, all three of the catches in lec.c are real bugs - great work as always.

-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:10 EST