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

Commit 33ab625f authored by Cheng Renquan's avatar Cheng Renquan Committed by John W. Linville
Browse files

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: default avatarJérôme Poulin <jeromepoulin@gmail.com>
Signed-off-by: default avatarCheng Renquan <crquan@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b4b6cda2
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -417,19 +417,19 @@ ath5k_debug_init_device(struct ath5k_softc *sc)
	sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
	sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy),
				ath5k_global_debugfs);
				ath5k_global_debugfs);


	sc->debug.debugfs_debug = debugfs_create_file("debug", 0666,
	sc->debug.debugfs_debug = debugfs_create_file("debug", S_IWUSR | S_IRUGO,
				sc->debug.debugfs_phydir, sc, &fops_debug);
				sc->debug.debugfs_phydir, sc, &fops_debug);


	sc->debug.debugfs_registers = debugfs_create_file("registers", 0444,
	sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUGO,
				sc->debug.debugfs_phydir, sc, &fops_registers);
				sc->debug.debugfs_phydir, sc, &fops_registers);


	sc->debug.debugfs_tsf = debugfs_create_file("tsf", 0666,
	sc->debug.debugfs_tsf = debugfs_create_file("tsf", S_IWUSR | S_IRUGO,
				sc->debug.debugfs_phydir, sc, &fops_tsf);
				sc->debug.debugfs_phydir, sc, &fops_tsf);


	sc->debug.debugfs_beacon = debugfs_create_file("beacon", 0666,
	sc->debug.debugfs_beacon = debugfs_create_file("beacon", S_IWUSR | S_IRUGO,
				sc->debug.debugfs_phydir, sc, &fops_beacon);
				sc->debug.debugfs_phydir, sc, &fops_beacon);


	sc->debug.debugfs_reset = debugfs_create_file("reset", 0222,
	sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR,
				sc->debug.debugfs_phydir, sc, &fops_reset);
				sc->debug.debugfs_phydir, sc, &fops_reset);
}
}