linux/net/x25
Gavrilov Ilia d6eb8de201 net/x25: fix incorrect parameter validation in the x25_getsockopt() function
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>
2024-03-11 09:53:22 +00:00
..
af_x25.c net/x25: fix incorrect parameter validation in the x25_getsockopt() function 2024-03-11 09:53:22 +00:00
Kconfig net: x25: remove dead links from Kconfig 2024-03-07 20:24:35 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sysctl_net_x25.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x25_dev.c net/x25: Fix skb leak in x25_lapb_receive_frame() 2022-11-15 20:22:19 -08:00
x25_facilities.c net: remove SOCK_DEBUG leftovers 2023-12-26 20:31:01 +00: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 net: x25: drop harmless check of !more 2021-12-09 18:35:11 -08: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 net: remove SOCK_DEBUG leftovers 2023-12-26 20:31:01 +00:00
x25_proc.c x25: remove redundant pointer dev 2022-05-10 11:59:22 +02:00
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 net/x25: Fix null-ptr-deref in x25_disconnect 2020-04-28 14:08:59 -07:00
x25_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 41 2019-05-24 17:27:12 +02:00