In the Linux kernel, the following vulnerability has been resolved:
tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header
This is a follow-up for commit 974cb0e3e7c9 ("tipc: fix uninit-value
in tipc_nl_compat_name_table_dump") where it should have type casted
sizeof(..) to int to work when TLV_GET_DATA_LEN() returns a negative
value.
syzbot reported a call trace because of it:
BUG: KMSAN: uninit-value in ...
tipc_nl_compat_name_table_dump+0x841/0xea0net/tipc/netlink_compat.c:934__tipc_nl_compat_dumpit+0xab2/0x1320net/tipc/netlink_compat.c:238tipc_nl_compat_dumpit+0x991/0xb50net/tipc/netlink_compat.c:321tipc_nl_compat_recv+0xb6e/0x1640net/tipc/netlink_compat.c:1324genl_family_rcv_msg_doitnet/netlink/genetlink.c:731[inline]genl_family_rcv_msgnet/netlink/genetlink.c:775[inline]genl_rcv_msg+0x103f/0x1260net/netlink/genetlink.c:792netlink_rcv_skb+0x3a5/0x6c0net/netlink/af_netlink.c:2501genl_rcv+0x3c/0x50net/netlink/genetlink.c:803netlink_unicast_kernelnet/netlink/af_netlink.c:1319[inline]netlink_unicast+0xf3b/0x1270net/netlink/af_netlink.c:1345netlink_sendmsg+0x1288/0x1440net/netlink/af_netlink.c:1921sock_sendmsg_nosecnet/socket.c:714[inline]sock_sendmsgnet/socket.c:734[inline]