Skip to content
Snippets Groups Projects
Commit e112eb59 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman
Browse files

staging: et131x: zero allocation of fbr to prevent random address access


If et131x_rx_dma_memory_alloc() allocates rx_ring->fbr[0] but fails to
allocate rx_ring->fbr[1], this leaves fbr[0]->ring_virtaddr with the
possibility of being accessed in et131x_rx_dma_memory_free() as it
contains a random value, potentially causing an oops.

Fix this by zeroing the fbr memory on allocation. Subsequent frees of
this fbr memory explicitly zeros the ring_virtaddr value.

Reported-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bfe945c8
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment