Skip to content

Commit b765eda

Browse files
ArmondileSomasundaram Krishnasamy
authored andcommitted
ieee802154: enforce CAP_NET_RAW for raw sockets
When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Stefan Schmidt <[email protected]> Signed-off-by: David S. Miller <[email protected]> (cherry picked from commit e69dbd4) Orabug: 30444944 CVE: CVE-2019-17053 Reviewed-by: John Donnelly <[email protected]> Signed-off-by: Allen Pais <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 786539e commit b765eda

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

net/ieee802154/socket.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,9 @@ static int ieee802154_create(struct net *net, struct socket *sock,
10011001

10021002
switch (sock->type) {
10031003
case SOCK_RAW:
1004+
rc = -EPERM;
1005+
if (!capable(CAP_NET_RAW))
1006+
goto out;
10041007
proto = &ieee802154_raw_prot;
10051008
ops = &ieee802154_raw_ops;
10061009
break;

0 commit comments

Comments
 (0)