All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Ren Wei <weir@nebusec.ai>
Cc: 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,
	caoruide123@gmail.com
Subject: Re: [PATCH driver-core 0/1] kobject: reserve an envp slot for the terminator
Date: Mon, 23 Nov 2026 13:56:24 +0100	[thread overview]
Message-ID: <2026112353-mummy-knoll-cfa5@gregkh> (raw)
In-Reply-To: <cover.1795426787.git.caoruide123@gmail.com>

On Mon, Nov 23, 2026 at 08:16:36PM +0800, Ren Wei wrote:
> From: Ruide Cao <caoruide123@gmail.com>
> 
> Hi Linux kernel maintainers,
> 
> We found an issue in lib/kobject_uevent.c.
> 
> This bug is tracked at: https://bugtracker.nebusec.ai/f/16082
> 
> add_uevent_var() permits envp_idx to reach ARRAY_SIZE(env->envp), filling
> the final pointer slot without reserving a trailing NULL. With
> CONFIG_UEVENT_HELPER and a nonempty helper path, an event containing
> exactly 61 variables before SEQNUM causes SEQNUM, HOME, and PATH to fill
> all 64 slots. call_usermodehelper then asynchronously passes this
> unterminated array to kernel_execve(). count_strings_kernel() reads beyond
> envp into envp_idx and env->buf, interprets those bytes as pointers, and
> later dereferences invalid addresses while copying the environment.
> Synthetic arguments allow the environment count to be tuned, resulting in
> an out-of-bounds scan and kernel crash.
> 
> Privilege model: writing a synthetic uevent to /sys/module/kernel/uevent
> and setting /proc/sys/kernel/hotplug require CAP_SYS_ADMIN; the
> reproducer runs as root. The crash also depends on CONFIG_UEVENT_HELPER
> and a nonempty helper path.

This has come up many times in the past, nice to see your LLM has read
the mailing list archives :)

thanks,

greg k-h

      parent reply	other threads:[~2026-11-23 12:56 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
2026-11-23 12:56 ` Greg KH [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=2026112353-mummy-knoll-cfa5@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.