mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>, richard@nod.at
Cc: anton.ivanov@cambridgegreys.com, linux-um@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH] um: reject out-of-range port channel numbers
Date: Wed, 08 Apr 2026 09:39:02 +0200	[thread overview]
Message-ID: <d022d5597e1d5ca3ecddb192e39d4a14a16d4c5a.camel@sipsolutions.net> (raw)
In-Reply-To: <20260401160315.88534-1-pengpeng@iscas.ac.cn>

On Thu, 2026-04-02 at 00:03 +0800, Pengpeng Hou wrote:
> port_init() parses the port channel number into an int, formats it into
> a small fixed string buffer, and later passes it to htons() for bind().
> Out-of-range values can therefore overflow the local device-name buffer
> and still get silently truncated at the socket layer.

So ... you have a whole bunch of these fixes, but do we really assume
that the kernel command-line is somehow attacker controlled for ARCH=um?

Maybe I'm not imagining the right things, but I have a hard time seeing
anyone run a service of any sort where the command line gets to be user-
controlled, and yet the kernel needs to be secure against that user; in
a normal ARCH=um scenario the command line is written by the user as
something like

	linux foo=bar mem=256M ...

and then can happily attach gdb to the process and muck with it any way
they want anyway?

I'd probably say the code shouldn't have been this way at the start, but
I'm also not convinced it's even really worth fixing for anything but
the "look my LLM found _something_" creds...

johannes

  reply	other threads:[~2026-04-08  7:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-01 16:03 Pengpeng Hou
2026-04-08  7:39 ` Johannes Berg [this message]
2026-04-08  8:00   ` Anton Ivanov
2026-04-08  8:09 ` Pengpeng Hou

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=d022d5597e1d5ca3ecddb192e39d4a14a16d4c5a.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=richard@nod.at \
    /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

all inboxes | Powered by JetHome®