Repository navigation
Commit a8fe915
ipv4: Check attribute length for RTA_GATEWAY in multipath route
commit 7a3429b upstream.
syzbot reported uninit-value:
============================================================
BUG: KMSAN: uninit-value in fib_get_nhs+0xac4/0x1f80
net/ipv4/fib_semantics.c:708
fib_get_nhs+0xac4/0x1f80 net/ipv4/fib_semantics.c:708
fib_create_info+0x2411/0x4870 net/ipv4/fib_semantics.c:1453
fib_table_insert+0x45c/0x3a10 net/ipv4/fib_trie.c:1224
inet_rtm_newroute+0x289/0x420 net/ipv4/fib_frontend.c:886
Add helper to validate RTA_GATEWAY length before using the attribute.
Fixes: 4e902c5 ("[IPv4]: FIB configuration using struct fib_config")
Reported-by: syzbot+d4b9a2851cc3ce998741@syzkaller.appspotmail.com
Signed-off-by: David Ahern <dsahern@kernel.org>
Cc: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 786a335 commit a8fe915
1 file changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
666 | 679 | | |
667 | 680 | | |
668 | 681 | | |
| |||
705 | 718 | | |
706 | 719 | | |
707 | 720 | | |
708 | | - | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
709 | 726 | | |
710 | 727 | | |
711 | 728 | | |
| |||
903 | 920 | | |
904 | 921 | | |
905 | 922 | | |
| 923 | + | |
906 | 924 | | |
907 | 925 | | |
908 | 926 | | |
| |||
913 | 931 | | |
914 | 932 | | |
915 | 933 | | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
916 | 940 | | |
917 | | - | |
| 941 | + | |
918 | 942 | | |
919 | 943 | | |
920 | 944 | | |
921 | | - | |
922 | 945 | | |
923 | 946 | | |
924 | 947 | | |
| |||
0 commit comments