summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorMichael Brown2012-07-01 19:24:15 +0200
committerMichael Brown2012-07-01 19:31:23 +0200
commit19859d8eada26eeeb881054efc242cf2ed5609fb (patch)
treed3185a890d2de1840a72aafb3509946057eae1e5 /src/util
parent[tcp] Avoid potential NULL pointer dereference (diff)
downloadipxe-19859d8eada26eeeb881054efc242cf2ed5609fb.tar.gz
ipxe-19859d8eada26eeeb881054efc242cf2ed5609fb.tar.xz
ipxe-19859d8eada26eeeb881054efc242cf2ed5609fb.zip
[arp] Prevent ARP cache entries from being deleted mid-transmission
Each ARP cache entry maintains a transmission queue, which is sent out as soon as the link-layer address is known. If multiple packets are queued, then it is possible for memory pressure to cause the ARP cache discarder to be invoked during transmission of the first packet, which may cause the ARP cache entry to be deleted before the second packet can be sent. This results in an invalid pointer dereference. Avoid this problem by reference-counting ARP cache entries and ensuring that an extra reference is held while processing the transmission queue, and by using list_first_entry() rather than list_for_each_entry_safe() to traverse the queue. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/util')
0 files changed, 0 insertions, 0 deletions