Re: [PATCH net v3 3/4] rxrpc: Improve setsockopt() handling of malformed user input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal Luczaj <mhal@xxxxxxx> wrote:

> copy_from_sockptr() does not return negative value on error; instead, it
> reports the number of bytes that failed to copy. Since it's deprecated,
> switch to copy_safe_from_sockptr().
> 
> Note: Keeping the `optlen != sizeof(unsigned int)` check as
> copy_safe_from_sockptr() by itself would also accept
> optlen > sizeof(unsigned int). Which would allow a more lenient handling
> of inputs.
> 
> Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
> Signed-off-by: Michal Luczaj <mhal@xxxxxxx>

Acked-by: David Howells <dhowells@xxxxxxxxxx>






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux