442db0d6d8
The swconfig kernel infrastructure fails to do any permissions checks when changing settings. As such an ordinary user account on a device with a switch can change switch settings without any special permissions. Routers generally have few non-admin users so this isn't a big hole, but it is a security hole. Likely the greatest danger is for multifunction devices which have a lot of extra daemons, compromising a low-security daemon would allow one to modify switch settings and cause the router/switch to appear to lock-up (or cause other sorts of troublesome nyetwork behavior). Implement a check for CAP_NET_ADMIN in swconfig_set_attr() and deny any requests originating from user contexts lacking this capability. Reported-by: Elliott Mitchell <ehem+openwrt@m5p.com> Signed-off-by: Jo-Philipp Wich <jo@mein.io> |
||
---|---|---|
.. | ||
b53 | ||
adm6996.c | ||
adm6996.h | ||
ar8216.c | ||
ar8216.h | ||
ar8327.c | ||
ar8327.h | ||
ip17xx.c | ||
mvsw61xx.c | ||
mvsw61xx.h | ||
mvswitch.c | ||
mvswitch.h | ||
psb6970.c | ||
rtl8306.c | ||
rtl8366_smi.c | ||
rtl8366_smi.h | ||
rtl8366rb.c | ||
rtl8366s.c | ||
rtl8367.c | ||
rtl8367b.c | ||
swconfig.c | ||
swconfig_leds.c |