From: sashiko-bot@kernel.org
To: "Eric Biggers" <ebiggers@kernel.org>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 5.15] crypto: sun4i-ss - Remove insecure and unused rng_alg
Date: Fri, 17 Jul 2026 04:04:33 +0000 [thread overview]
Message-ID: <20260717040433.ECF6F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260717035228.353051-1-ebiggers@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The driver fails to remove its debugfs directory on device removal or module unload, leading to a dangling debugfs entry that can cause a use-after-free and kernel panic.
--
--- Patch [1]: [PATCH 5.15] crypto: sun4i-ss - Remove insecure and unused rng_alg ---
commit 170a30200701519fc546c370a0ab6113fdc3a608
Author: Eric Biggers <ebiggers@kernel.org>
crypto: sun4i-ss - Remove insecure and unused rng_alg
This commit removes the sun4i_ss_rng implementation because it is insecure,
has multiple vulnerabilities including a buffer overflow, and is unused.
There is no point in fixing these issues individually when the code is
unneeded.
Closes: https://lore.kernel.org/r/af749a8447bd7f0e9dd26ca6c87e9c6afecb09d9@linux.dev/
> diff --git a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
> --- a/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
> +++ b/drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c
[ ... ]
> @@ -535,9 +502,6 @@ static int sun4i_ss_remove(struct platform_device *pdev)
> case CRYPTO_ALG_TYPE_AHASH:
> crypto_unregister_ahash(&ss_algs[i].alg.hash);
> break;
> - case CRYPTO_ALG_TYPE_RNG:
> - crypto_unregister_rng(&ss_algs[i].alg.rng);
> - break;
> }
> }
>
[Severity: High]
This is a pre-existing issue, but does this function leak the debugfs
directory when the module is removed?
In sun4i_ss_probe(), the driver sets up the debugfs entries:
ss->dbgfs_dir = debugfs_create_dir("sun4i-ss", NULL);
ss->dbgfs_stats = debugfs_create_file("stats", 0444, ss->dbgfs_dir, ss,
&sun4i_ss_debugfs_fops);
Since sun4i_ss_remove() lacks a corresponding debugfs_remove_recursive()
call, could unloading the module leave the debugfs entries registered in the
VFS, leading to a use-after-free and kernel panic if someone opens
/sys/kernel/debug/sun4i-ss/stats after the module memory is freed?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717035228.353051-1-ebiggers@kernel.org?part=1
prev parent reply other threads:[~2026-07-17 4:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 3:52 [PATCH 5.15] crypto: sun4i-ss - Remove insecure and unused rng_alg Eric Biggers
2026-07-17 4:04 ` sashiko-bot [this message]
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=20260717040433.ECF6F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ebiggers@kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--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