]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netfilter: xt_osf: Add missing permission checks
authorKevin Cernekee <cernekee@chromium.org>
Tue, 5 Dec 2017 23:42:41 +0000 (15:42 -0800)
committerBrian Maly <brian.maly@oracle.com>
Mon, 17 Dec 2018 23:57:54 +0000 (18:57 -0500)
commita5fad9610f4a757d3822a3383a91fe63b950fc0b
treed619a2d7c1a8a8e3906140d49f7a816232489650
parentf358bb7ddd2f12747a7cae17fb24fc76a04e8e3b
netfilter: xt_osf: Add missing permission checks

The capability check in nfnetlink_rcv() verifies that the caller
has CAP_NET_ADMIN in the namespace that "owns" the netlink socket.
However, xt_osf_fingers is shared by all net namespaces on the
system.  An unprivileged user can create user and net namespaces
in which he holds CAP_NET_ADMIN to bypass the netlink_net_capable()
check:

    vpnns -- nfnl_osf -f /tmp/pf.os

    vpnns -- nfnl_osf -f /tmp/pf.os -d

These non-root operations successfully modify the systemwide OS
fingerprint list.  Add new capable() checks so that they can't.

Signed-off-by: Kevin Cernekee <cernekee@chromium.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
(cherry picked from commit 916a27901de01446bcf57ecca4783f6cff493309)

Orabug: 29037831
CVE: CVE-2017-17450

Signed-off-by: John Donnelly <john.p.donnelly@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
net/netfilter/xt_osf.c