Commit 6ea5ec5
committed
net: ethernet: Check that header is valid
Saw this crash with heavily loaded system in mimxrt1050_evk:
<err> os: ***** MPU FAULT *****
<err> os: Data Access Violation
<err> os: MMFAR Address: 0xc
<err> os: r0/a1: 0x80000ab0 r1/a2: 0x800f6a60 r2/a3: 0x00000000
<err> os: r3/a4: 0x800f72a0 r12/ip: 0x00000000 r14/lr: 0x6000eb43
<err> os: xpsr: 0x41000000
<err> os: Faulting instruction address (r15/pc): 0x6000dc82
<err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
<err> os: Current thread: 0x80001a18 (rx_workq)
<err> os: Halting system
Where the fault at 0x6000dc82 points to ethernet_recv()
uint16_t type = ntohs(hdr->type);
6000dc82: 89ab ldrh r3, [r5, #12]
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>1 parent 43130f8 commit 6ea5ec5
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
181 | 187 | | |
182 | 188 | | |
183 | 189 | | |
| |||
0 commit comments