From: Greg KH <gregkh@linuxfoundation.org>
To: Ruide Cao <caoruide123@gmail.com>
Cc: Ren Wei <weir@nebusec.ai>,
linux-kernel@vger.kernel.org, driver-core@lists.linux.dev,
rafael@kernel.org, dakr@kernel.org, johan@kernel.org,
akpm@linux-foundation.org, kay.sievers@vrfy.org, vega@nebusec.ai
Subject: Re: [PATCH driver-core 1/1] kobject: reserve an envp slot for the terminator
Date: Wed, 25 Nov 2026 10:59:17 +0100 [thread overview]
Message-ID: <2026112518-dynamic-trustee-d86e@gregkh> (raw)
In-Reply-To: <CACveakTAopfuvAVQnbzzU3c6z2efTgySV5xo7330KAD6nMSxYQ@mail.gmail.com>
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
A: No.
Q: Should I include quotations after my reply?
http://daringfireball.net/2007/07/on_top
On Wed, Nov 25, 2026 at 05:13:08PM +0800, Ruide Cao wrote:
> Hi Greg,
>
> You are right to be suspicious of this one, thanks. v1 was not good
> enough: the "- 1" lowers the limit for every uevent from 64 to 63,
> including events that never go near the usermode helper. In testing,
> a currently valid 64-variable event was rejected (with the "too many
> keys" WARN) on v1, on both the helper and the netlink-only path.
>
> The underlying bug is still real: when env->envp[] is completely full
> there is no slot left for the NULL terminator, so with
> CONFIG_UEVENT_HELPER the helper's envp is not terminated and
> kernel_execve() walks past the array (KASAN: strnlen <-
> copy_string_kernel <- kernel_execve, then panic).
This is an ai-response. {sigh}
Please do this work yourself.
> v2 keeps the 64-variable capacity and instead adds one dedicated
> terminator slot (envp[UEVENT_NUM_ENVP + 1]), writes NULL after every
> successful add_uevent_var(), and also after zap_modalias_env() drops
> MODALIAS. struct kobj_uevent_env is kernel-internal, so the only
> visible change is 8 bytes.
What does this mean? Again, think about the problem, come up with a
valid solution, and write this all in your own words.
thanks,
greg k-h
next prev parent reply other threads:[~2026-11-25 10:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 12:16 [PATCH driver-core 0/1] kobject: reserve an envp slot for the terminator Ren Wei
2026-11-23 12:16 ` [PATCH driver-core 1/1] " Ren Wei
2026-11-23 12:57 ` Greg KH
2026-11-25 9:13 ` Ruide Cao
2026-11-25 9:59 ` Greg KH [this message]
2026-11-23 12:56 ` [PATCH driver-core 0/1] " Greg KH
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=2026112518-dynamic-trustee-d86e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=caoruide123@gmail.com \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=johan@kernel.org \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=vega@nebusec.ai \
--cc=weir@nebusec.ai \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.