From: sashiko-bot@kernel.org
To: "Aaron Tomlin" <atomlin@atomlin.com>
Cc: ojeda@kernel.org, linux-modules@vger.kernel.org
Subject: Re: [PATCH v10 2/2] module: Rename module_blacklist to module_denylist
Date: Thu, 03 Sep 2026 19:07:35 +0000 [thread overview]
Message-ID: <20260903190735.82B051F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260903185557.183224-3-atomlin@atomlin.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] module_is_denylisted() uses exact memory comparison (memcmp) instead of treating dashes and underscores interchangeably, breaking denylisting for module names with dashes.
--
commit 2df01653b8cde06423a15fc161d3df5e8eddbdba
Author: Aaron Tomlin <atomlin@atomlin.com>
module: Rename module_blacklist to module_denylist
This patch renames the module_blacklist boot parameter and internal
variables to module_denylist, keeping the old parameter as a deprecated
legacy alias. Internal symbols and log messages are also updated to
reflect the new nomenclature.
> diff --git a/init/main.c b/init/main.c
> --- a/init/main.c
> +++ b/init/main.c
> @@ -1347,17 +1347,17 @@ static inline void do_trace_initcall_level(const char *level)
[ ... ]
> -bool __init_or_module module_is_blacklisted(const char *module_name)
> +bool __init_or_module module_is_denylisted(const char *module_name)
> {
> const char *p;
> size_t len;
>
> - if (!module_blacklist)
> + if (!module_denylist)
> return false;
>
> - for (p = module_blacklist; *p; p += len) {
> + for (p = module_denylist; *p; p += len) {
> len = strcspn(p, ",");
> if (strlen(module_name) == len && !memcmp(module_name, p, len))
> return true;
[Severity: High]
This isn't a bug introduced by this patch, but it appears the renamed
module_is_denylisted() function retains a pre-existing logic issue.
Does the exact memory comparison here break denylisting for module names
containing hyphens?
Since the kernel build system converts module names to use underscores
internally (e.g. "my_module"), if an administrator passes a module name
with a hyphen on the command line (like "module_denylist=my-module"),
the strict memcmp() will fail to match the hyphen to the underscore.
This would allow an explicitly denylisted module to load, which could
defeat the administrative mitigation for buggy or malicious modules.
Is there a string comparison utility we should use here instead to treat
hyphens and underscores interchangeably?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260903185557.183224-1-atomlin@atomlin.com?part=2
next prev parent reply other threads:[~2026-09-03 19:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-03 18:55 [PATCH v10 0/2] module: Extend module_blacklist parameter to built-in modules Aaron Tomlin
2026-09-03 18:55 ` [PATCH v10 1/2] " Aaron Tomlin
2026-09-03 19:13 ` sashiko-bot
2026-09-04 14:34 ` Aaron Tomlin
2026-09-06 13:39 ` Gary Guo
2026-09-06 15:07 ` Aaron Tomlin
2026-09-03 20:23 ` Aaron Tomlin
2026-09-03 18:55 ` [PATCH v10 2/2] module: Rename module_blacklist to module_denylist Aaron Tomlin
2026-09-03 19:07 ` sashiko-bot [this message]
2026-09-04 15:13 ` Aaron Tomlin
2026-09-03 20:29 ` [PATCH v10 0/2] module: Extend module_blacklist parameter to built-in modules Andrew Morton
2026-09-04 14:59 ` Aaron Tomlin
2026-09-06 0:28 ` Andrew Morton
2026-09-06 9:56 ` Arnd Bergmann
2026-09-06 12:33 ` Gary Guo
2026-09-06 14:08 ` Aaron Tomlin
2026-09-06 13:15 ` Aaron Tomlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260903190735.82B051F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=atomlin@atomlin.com \
--cc=linux-modules@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox