This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

redboot rltk8139 crash fix (memcpy to 0)


This patch fixes a crash I see on my mips target with the realtek 8139
driver and redboot where memcpy gets called with a destination
address of zero.

As I understand it, the zero buffer address comes from
io/eth/current/src/stand_alone/eth_drv.c eth_drv_recv() when it
can't find a free recv. buffer.  It then uses a buffer address of zero
to signal the ethernet driver below it to ignore the packet.  The rltk8139
driver wasn't checking this condition, and so passed the 0 into memcpy.

In looking at code, I noticed at least the dp83816 driver seems to have the
same problem.  I didn't exhaustively check the other drivers.



-- 
Hardware, n.:
        The parts of a computer system that can be kicked.

Attachment: ecos-rltk-memcpy-fix.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]