]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: Display LACP info only to CAP_NET_ADMIN capable user
authorMahesh Bandewar <maheshb@google.com>
Thu, 18 Jun 2015 18:30:54 +0000 (11:30 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Jun 2015 10:11:52 +0000 (03:11 -0700)
commitd306b5fb1dc73158b6e829501d1ff91363a59fb6
tree0ce370cb5df403d33052768ec5db283cc3448180
parent444998c8c2f5c5334e1a2b60074877d91584ae4a
bonding: Display LACP info only to CAP_NET_ADMIN capable user

Actor and Partner details can be accessed via proc-fs, sys-fs
entries or netlink interface. These interfaces are world readable
at this moment. The earlier patch-series made the LACP communication
secure to avoid nuisance attack from within the same L2 domain but
it did not prevent "someone unprivileged" looking at that information
on host and perform the same act.

This patch essentially avoids spitting those entries if the user
in question does not have enough privileges.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_netlink.c
drivers/net/bonding/bond_procfs.c
drivers/net/bonding/bond_sysfs.c