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>tags/v1.20.1
|
|
||
31 |
|
31 |
|
32 |
|
32 |
|
33 |
|
33 |
|
|
34 |
|
|
34 |
|
35 |
|
35 |
|
36 |
|
36 |
|
37 |
|
|
|
||
51 |
|
52 |
|
52 |
|
53 |
|
53 |
|
54 |
|
|
55 |
|
|
|
56 |
|
|
54 |
|
57 |
|
55 |
|
58 |
|
56 |
|
59 |
|
|
|
||
76 |
|
79 |
|
77 |
|
80 |
|
78 |
|
81 |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
|
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
|
|
79 |
|
101 |
|
80 |
|
102 |
|
81 |
|
103 |
|
|
|
||
91 |
|
113 |
|
92 |
|
114 |
|
93 |
|
115 |
|
94 |
|
|
|
|
116 |
|
|
95 |
|
117 |
|
96 |
|
118 |
|
97 |
|
119 |
|
98 |
|
|
|
99 |
|
|
|
|
120 |
|
|
100 |
|
121 |
|
101 |
|
122 |
|
102 |
|
123 |
|
103 |
|
124 |
|
104 |
|
125 |
|
105 |
|
126 |
|
106 |
|
|
|
|
127 |
|
|
107 |
|
128 |
|
108 |
|
129 |
|
109 |
|
130 |
|
110 |
|
|
|
111 |
|
131 |
|
112 |
|
132 |
|
113 |
|
133 |
|
114 |
|
134 |
|
|
135 |
|
|
|
136 |
|
|
|
137 |
|
|
115 |
|
138 |
|
116 |
|
139 |
|
117 |
|
140 |
|
|
|
||
174 |
|
197 |
|
175 |
|
198 |
|
176 |
|
199 |
|
177 |
|
|
|
178 |
|
|
|
|
200 |
|
|
179 |
|
201 |
|
180 |
|
|
|
|
202 |
|
|
181 |
|
203 |
|
182 |
|
204 |
|
183 |
|
205 |
|
|
|
||
241 |
|
263 |
|
242 |
|
264 |
|
243 |
|
265 |
|
244 |
|
|
|
245 |
|
266 |
|
246 |
|
267 |
|
247 |
|
268 |
|
|
|
||
254 |
|
275 |
|
255 |
|
276 |
|
256 |
|
277 |
|
257 |
|
|
|
258 |
|
|
|
|
278 |
|
|
|
279 |
|
|
|
280 |
|
|
|
281 |
|
|
|
282 |
|
|
|
283 |
|
|
|
284 |
|
|
259 |
|
285 |
|
260 |
|
286 |
|
261 |
|
287 |
|
|
|
||
267 |
|
293 |
|
268 |
|
294 |
|
269 |
|
295 |
|
|
296 |
|
|
270 |
|
297 |
|
271 |
|
298 |
|
272 |
|
299 |
|