Bug 12076 (TiCPU)
Summary: | Security issue in DebugFS part of ath5k | ||
---|---|---|---|
Product: | Networking | Reporter: | Jérôme Poulin (jeromepoulin) |
Component: | Wireless | Assignee: | Luis Chamberlain (mcgrof) |
Status: | CLOSED CODE_FIX | ||
Severity: | high | CC: | crquan, mcgrof |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.28 | Subsystem: | |
Regression: | --- | Bisected commit-id: |
Description
Jérôme Poulin
2008-11-21 18:40:34 UTC
I've made a patch to fix it, it's very simple to fix it: http://marc.info/?l=linux-kernel&m=122732420108666&w=2 but I dont' have that hardware, please test it if you have it. I had a similar patch I forgot to attach I submitted to the ath5k tracker but this one is even better because it uses S_I* constants, here is the result of the test; Before: p4 sys # ls /sys/kernel/debug/ath5k/phy0/ -l total 0 -rw-rw-rw- 1 root root 0 2008-11-23 10:41 beacon -rw-rw-rw- 1 root root 0 2008-11-23 10:41 debug -r--r--r-- 1 root root 0 2008-11-23 10:41 registers --w--w--w- 1 root root 0 2008-11-23 10:41 reset -rw-rw-rw- 1 root root 0 2008-11-23 10:41 tsf Patch... p4 sys # cd /usr/src/linux p4 linux # patch -p1 -i ../linux-2.6.27-gentoo-r1/perm.patch patching file drivers/net/wireless/ath5k/debug.c p4 linux # make modules ... p4 linux # rmmod ath5k p4 linux # insmod drivers/net/wireless/ath5k/ath5k.ko After: p4 linux # ls /sys/kernel/debug/ath5k/phy1/ -l total 0 -rw-r--r-- 1 root root 0 2008-11-23 11:39 beacon -rw-r--r-- 1 root root 0 2008-11-23 11:39 debug -r--r--r-- 1 root root 0 2008-11-23 11:39 registers --w------- 1 root root 0 2008-11-23 11:39 reset -rw-r--r-- 1 root root 0 2008-11-23 11:39 tsf Seems perfect! Thanks. This is fixed by: commit 66bc446d4fd057310cc6310721c33767e7c0b408 Author: Cheng Renquan <crquan@gmail.com> Date: Sat Nov 22 11:22:49 2008 +0800 ath5k: fix Security issue in DebugFS part of ath5k http://bugzilla.kernel.org/show_bug.cgi?id=12076 Remove any write access to groups and others, only keep write permission to its owner, usually only root user. Reported-by: Jérôme Poulin <jeromepoulin@gmail.com> Signed-off-by: Cheng Renquan <crquan@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> It just need to be propagated to the other kernels. |