Commit c2d27b3
netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr
commit 8866df9 upstream
Otherwise, we hit a NULL pointer deference since handlers always assume
default timeout policy is passed.
netlink: 24 bytes leftover after parsing attributes in process `syz-executor2'.
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 9575 Comm: syz-executor1 Not tainted 4.19.0+ torvalds#312
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:icmp_timeout_obj_to_nlattr+0x77/0x170 net/netfilter/nf_conntrack_proto_icmp.c:297
Fixes: c779e84 ("netfilter: conntrack: remove get_timeout() indirection")
Reported-by: Eric Dumazet <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Zubin Mithra <[email protected]>
Signed-off-by: Sasha Levin (Microsoft) <[email protected]>1 parent 564f039 commit c2d27b3
1 file changed
+40
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | | - | |
| 395 | + | |
| 396 | + | |
396 | 397 | | |
397 | 398 | | |
398 | 399 | | |
| |||
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
424 | | - | |
| 425 | + | |
425 | 426 | | |
426 | 427 | | |
427 | 428 | | |
| |||
444 | 445 | | |
445 | 446 | | |
446 | 447 | | |
| 448 | + | |
447 | 449 | | |
448 | 450 | | |
449 | 451 | | |
| |||
456 | 458 | | |
457 | 459 | | |
458 | 460 | | |
459 | | - | |
460 | | - | |
461 | | - | |
| 461 | + | |
| 462 | + | |
462 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
463 | 494 | | |
464 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
465 | 499 | | |
466 | 500 | | |
467 | 501 | | |
| |||
472 | 506 | | |
473 | 507 | | |
474 | 508 | | |
475 | | - | |
| 509 | + | |
476 | 510 | | |
477 | 511 | | |
478 | 512 | | |
| |||
0 commit comments