]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
netrom: fix api breakage in nr_setsockopt()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 7 Jan 2022 07:12:10 +0000 (10:12 +0300)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:54 +0000 (10:59 +0100)
commit845f04c063547fe873c2ff9675c4820e65452973
tree6bd083c28bbdd16a25ea82b1246a9325beddad7d
parentf30ec41647185884fd179f6598b074e3b595e38d
netrom: fix api breakage in nr_setsockopt()

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit dc35616e6c2907b0c0c391a205802d8880f7fd85 ]

This needs to copy an unsigned int from user space instead of a long to
avoid breaking user space with an API change.

I have updated all the integer overflow checks from ULONG to UINT as
well.  This is a slight API change but I do not expect it to affect
anything in real life.

Fixes: 3087a6f36ee0 ("netrom: fix copying in user data in nr_setsockopt")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/netrom/af_netrom.c