Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 346434c6 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Gerrit - the friendly Code Review server
Browse files

netlink: Add netns check on taps



[ Upstream commit 93c647643b48f0131f02e45da3bd367d80443291 ]

Currently, a nlmon link inside a child namespace can observe systemwide
netlink activity.  Filter the traffic so that nlmon can only sniff
netlink messages from its own netns.

Test case:

    vpnns -- bash -c "ip link add nlmon0 type nlmon; \
                      ip link set nlmon0 up; \
                      tcpdump -i nlmon0 -q -w /tmp/nlmon.pcap -U" &
    sudo ip xfrm state add src 10.1.1.1 dst 10.1.1.2 proto esp \
        spi 0x1 mode transport \
        auth sha1 0x6162633132330000000000000000000000000000 \
        enc aes 0x00000000000000000000000000000000
    grep --binary abc123 /tmp/nlmon.pcap

Change-Id: Iac724785371047d0af2fb0285c48bb7808b9394f
Bug: 70980949
Signed-off-by: default avatarKevin Cernekee <cernekee@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 04de0650469ab58d5159b29f850fc3c06e6f4975
Git-repo: https://android.googlesource.com/kernel/msm


Signed-off-by: default avatarSrinivasa Rao Kuppala <srkupp@codeaurora.org>
parent 04d0ab9f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment