lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1426279372.11459.34.camel@perches.com>
Date:	Fri, 13 Mar 2015 13:42:52 -0700
From:	Joe Perches <joe@...ches.com>
To:	Nicholas Mc Guire <hofrat@...dl.org>
Cc:	Andy Whitcroft <apw@...onical.com>, linux-kernel@...r.kernel.org,
	Ralf Baechle <ralf@...ux-mips.org>,
	Alexander Graf <agraf@...e.de>, Gleb Natapov <gleb@...nel.org>,
	Paolo Bonzini <pbonzini@...hat.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Paul Mackerras <paulus@...ba.org>,
	Michael Ellerman <mpe@...erman.id.au>,
	Kalle Valo <kvalo@...eaurora.org>,
	Sebastian Reichel <sre@...nel.org>,
	Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
	David Woodhouse <dwmw2@...radead.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] checkpatch: catch all world writable debugfs_create_file

On Fri, 2015-03-13 at 15:23 -0400, Nicholas Mc Guire wrote:
> Currently checkpatch will fuss if one uses world writable settings in debugfs
> files by passing S_IWUGO but not when passing S_IWOTH, S_IRWXUGO or S_IALLUGO.
> This patch extends the check to catches all cases exporting world writable 
> files

Maybe the debugfs_create_file should be debugfs_create_\w+

And there are also these octal matches:

$ git grep -E -n "debugfs.*\b0[0-7][0-7][2367]"
arch/mips/cavium-octeon/oct_ilm.c:75:   show_dentry = debugfs_create_file("statistics", 0222, dir, NULL,
arch/mips/cavium-octeon/oct_ilm.c:82:   show_dentry = debugfs_create_file("reset", 0222, dir, NULL,
arch/powerpc/kvm/timing.c:226:  debugfs_file = debugfs_create_file(dbg_fname, 0666,
drivers/misc/genwqe/card_debugfs.c:376: file = debugfs_create_x64("err_inject", 0666, root, &cd->err_inject);
drivers/misc/genwqe/card_debugfs.c:382: file = debugfs_create_u32("ddcb_software_timeout", 0666, root,
drivers/misc/genwqe/card_debugfs.c:389: file = debugfs_create_u32("kill_timeout", 0666, root,
drivers/misc/genwqe/card_debugfs.c:461:         file = debugfs_create_u32(name, 0666, root,
drivers/misc/genwqe/card_debugfs.c:483: file = debugfs_create_u32("skip_recovery", 0666, root,
drivers/misc/genwqe/card_debugfs.c:490: file = debugfs_create_u32("use_platform_recovery", 0666, root,
drivers/net/wireless/mac80211_hwsim.c:2452:     debugfs_create_file("ps", 0666, data->debugfs, data, &hwsim_fops_ps);
drivers/net/wireless/mac80211_hwsim.c:2453:     debugfs_create_file("group", 0666, data->debugfs, data,
drivers/net/wireless/mac80211_hwsim.c:2456:             debugfs_create_file("dfs_simulate_radar", 0222,
drivers/power/axp288_fuel_gauge.c:333:  info->debug_file = debugfs_create_file("fuelgauge", 0666, NULL,
drivers/power/da9030_battery.c:191:     charger->debug_file = debugfs_create_file("charger", 0666, NULL,
kernel/trace/blktrace.c:499:    bt->msg_file = debugfs_create_file("msg", 0222, dir, bt, &blk_msg_fops);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ