linux-stable/drivers/net/ppp
Philipp Stanner caf3100810 drivers/net/ppp: use standard array-copy-function
In ppp_generic.c, memdup_user() is utilized to copy a userspace array.
This is done without an overflow-check, which is, however, not critical
because the multiplicands are an unsigned short and struct sock_filter,
which is currently of size 8.

Regardless, string.h now provides memdup_array_user(), a wrapper for
copying userspace arrays in a standardized manner, which has the
advantage of making it more obvious to the reader that an array is being
copied.
The wrapper additionally performs an obligatory overflow check, saving
the reader the effort of analyzing the potential for overflow, and
making the code a bit more robust in case of future changes to the
multiplicands len * size.

Replace memdup_user() with memdup_array_user().

Suggested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-11-08 09:40:19 +00:00
..
bsd_comp.c
Kconfig net/pppoe: fix a typo for the PPPOE_HASH_BITS_1 definition 2023-06-06 13:28:30 +02:00
Makefile
ppp_async.c tty: ldops: unify to u8 2023-08-11 21:12:47 +02:00
ppp_deflate.c
ppp_generic.c drivers/net/ppp: use standard array-copy-function 2023-11-08 09:40:19 +00:00
ppp_mppe.c
ppp_mppe.h
ppp_synctty.c tty: ldops: unify to u8 2023-08-11 21:12:47 +02:00
pppoe.c net: implement lockless SO_PRIORITY 2023-10-01 19:09:54 +01:00
pppox.c
pptp.c net: ppp: Remove unnecessary (void*) conversions 2023-07-18 19:00:47 -07:00