linux-stable/net/llc
Michal Luczaj 1465036b10 llc: Improve setsockopt() handling of malformed user input
copy_from_sockptr() is used incorrectly: return value is the number of
bytes that could not be copied. Since it's deprecated, switch to
copy_safe_from_sockptr().

Note: Keeping the `optlen != sizeof(int)` check as copy_safe_from_sockptr()
by itself would also accept optlen > sizeof(int). Which would allow a more
lenient handling of inputs.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Suggested-by: David Wei <dw@davidwei.uk>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2024-11-28 08:57:42 +01:00
..
af_llc.c llc: Improve setsockopt() handling of malformed user input 2024-11-28 08:57:42 +01:00
Kconfig net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
llc_c_ac.c llc/snap: constify dev_addr passing 2021-10-13 09:40:46 -07:00
llc_c_ev.c net: llc: Correct some function names in header 2021-03-26 15:24:14 -07:00
llc_c_st.c llc: Constify struct llc_conn_state_trans 2024-07-15 08:51:01 -07:00
llc_conn.c llc: Constify struct llc_conn_state_trans 2024-07-15 08:51:01 -07:00
llc_core.c llc: Drop support for ETH_P_TR_802_2. 2024-01-19 21:30:09 -08:00
llc_if.c llc: Check netns in llc_estab_match() and llc_listener_match(). 2023-07-20 10:46:28 +02:00
llc_input.c llc: verify mac len before reading mac header 2023-11-01 22:21:32 -07:00
llc_output.c llc/snap: constify dev_addr passing 2021-10-13 09:40:46 -07:00
llc_pdu.c net: llc: Correct function name llc_pdu_set_pf_bit() in header 2021-03-26 15:24:14 -07:00
llc_proc.c sock: Use sock_owned_by_user_nocheck() instead of sk_lock.owned. 2021-12-10 19:43:00 -08:00
llc_s_ac.c llc: verify mac len before reading mac header 2023-11-01 22:21:32 -07:00
llc_s_ev.c
llc_s_st.c llc: Constify struct llc_sap_state_trans 2024-07-15 08:51:19 -07:00
llc_sap.c llc: Constify struct llc_sap_state_trans 2024-07-15 08:51:19 -07:00
llc_station.c llc: verify mac len before reading mac header 2023-11-01 22:21:32 -07:00
Makefile llc: fix whitespace issues 2018-07-24 14:10:42 -07:00
sysctl_net_llc.c net: Remove ctl_table sentinel elements from several networking subsystems 2024-05-03 13:29:42 +01:00