mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Revert "llc: Improve setsockopt() handling of malformed user input"
This reverts commit 981d647c6f which is
commit 1465036b10be4b8b00eb31c879e86de633ad74c1 upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I33d7231dae0f23df8750010315515440e2687a9c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1099,7 +1099,7 @@ static int llc_ui_setsockopt(struct socket *sock, int level, int optname,
|
||||
lock_sock(sk);
|
||||
if (unlikely(level != SOL_LLC || optlen != sizeof(int)))
|
||||
goto out;
|
||||
rc = copy_safe_from_sockptr(&opt, sizeof(opt), optval, optlen);
|
||||
rc = copy_from_sockptr(&opt, optval, sizeof(opt));
|
||||
if (rc)
|
||||
goto out;
|
||||
rc = -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user