Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipv4: Check attribute length for RTA_GATEWAY in multipath route
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: [email protected] Signed-off-by: David Ahern <[email protected]> Cc: Thomas Graf <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information