linux-stable/net/x25
Gavrilov Ilia 3538d11d2a net/x25: fix incorrect parameter validation in the x25_getsockopt() function
[ Upstream commit d6eb8de201 ]

The 'len' variable can't be negative when assigned the result of
'min_t' because all 'min_t' parameters are cast to unsigned int,
and then the minimum one is chosen.

To fix the logic, check 'len' as read from 'optlen',
where the types of relevant variables are (signed) int.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:21:23 -04:00
..
Kconfig Replace HTTP links with HTTPS ones: X.25 network layer 2020-07-07 15:44:44 -07:00
Makefile
af_x25.c net/x25: fix incorrect parameter validation in the x25_getsockopt() function 2024-03-26 18:21:23 -04:00
sysctl_net_x25.c
x25_dev.c net/x25: Fix skb leak in x25_lapb_receive_frame() 2022-11-26 09:24:41 +01:00
x25_facilities.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x25_forward.c net: x25: Use list_for_each_entry() to simplify code in x25_forward.c 2021-06-08 16:31:25 -07:00
x25_in.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
x25_link.c net: x25: Use list_for_each_entry() to simplify code in x25_link.c 2021-06-08 16:31:24 -07:00
x25_out.c
x25_proc.c
x25_route.c net: x25: Use list_for_each_entry() to simplify code in x25_route.c 2021-06-10 14:08:09 -07:00
x25_subr.c
x25_timer.c