Commit 568c4d7
net/sched: act_pedit: Parse L3 Header for L4 offset
jira VULN-188478
cve-pre CVE-2026-46331
commit-author Rajat Gupta <rajat.gupta@oss.qualcomm.com>
commit 6c02568
Instead of relying on skb->transport_header being set correctly, opt
instead to parse the L3 header length out of the L3 headers for both
IPv4/IPv6 when the Extended Layer Op for tcp/udp is used. This fixes a
bug if GRO is disabled, when GRO is disabled skb->transport_header is
set by __netif_receive_skb_core() to point to the L3 header, it's later
fixed by the upper protocol layers, but act_pedit will receive the SKB
before the fixups are completed. The existing behavior causes the
following to edit the L3 header if GRO is disabled instead of the UDP
header:
tc filter add dev eth0 ingress protocol ip flower ip_proto udp \
dst_ip 192.168.1.3 action pedit ex munge udp set dport 18053
Also re-introduce a rate-limited warning if we were unable to extract
the header offset when using the 'ex' interface.
Fixes: 71d0ed7 ("net/act_pedit: Support using offset relative to
the conventional network headers")
Signed-off-by: Max Tottenham <mtottenh@akamai.com>
Reviewed-by: Josh Hunt <johunt@akamai.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305261541.N165u9TZ-lkp@intel.com/
Reviewed-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 6c02568)
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>1 parent 40a5659 commit 568c4d7
1 file changed
Lines changed: 43 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
20 | 22 | | |
| 23 | + | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
| |||
316 | 319 | | |
317 | 320 | | |
318 | 321 | | |
319 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
320 | 347 | | |
321 | 348 | | |
| 349 | + | |
322 | 350 | | |
323 | 351 | | |
324 | 352 | | |
325 | | - | |
| 353 | + | |
326 | 354 | | |
| 355 | + | |
| 356 | + | |
327 | 357 | | |
328 | 358 | | |
329 | 359 | | |
330 | 360 | | |
331 | 361 | | |
| 362 | + | |
332 | 363 | | |
333 | 364 | | |
| 365 | + | |
| 366 | + | |
334 | 367 | | |
335 | | - | |
336 | | - | |
| 368 | + | |
337 | 369 | | |
338 | 370 | | |
339 | 371 | | |
340 | 372 | | |
| 373 | + | |
341 | 374 | | |
342 | 375 | | |
343 | 376 | | |
| |||
372 | 405 | | |
373 | 406 | | |
374 | 407 | | |
| 408 | + | |
375 | 409 | | |
376 | 410 | | |
377 | 411 | | |
| |||
380 | 414 | | |
381 | 415 | | |
382 | 416 | | |
383 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
384 | 422 | | |
385 | 423 | | |
386 | 424 | | |
| |||
0 commit comments