mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Disseldorp <ddiss@suse.de>
To: Avi Weiss <thnkslprpt@gmail.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] initramfs_test: exercise the oversized CPIO namesize guard
Date: Wed, 4 Nov 2026 22:06:12 +1100	[thread overview]
Message-ID: <20261104220315.0cbf0ed2.ddiss@suse.de> (raw)
In-Reply-To: <20261027085138.4107590-2-thnkslprpt@gmail.com>

Hi,

On Tue, 27 Oct 2026 10:51:39 +0200, Avi Weiss wrote:

> initramfs_test_fname_path_max() uses a directory with a nonzero body.

Hmm, indeed, that doesn't make much sense.

> Such entries are skipped even without the namesize > PATH_MAX check,
> so the test does not detect removal of that check.

This is phrased a bit cryptically: the existing test *does* exercise
the name_len > PATH_MAX check, but you're right that removal of that
check would still see the the entry skipped due to the subsequent
if (S_ISREG(mode) || !body_len) filter.

> Use a regular file and terminate the archived pathname early after
> fill_cpio() has encoded the oversized namesize. This allows the test
> to detect a missing parser check without relying on VFS pathname
> length limits.

I don't think adding the early fname termination makes sense in the
context of the test.

      reply	other threads:[~2026-11-04 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27  8:51 Avi Weiss
2026-11-04 11:06 ` David Disseldorp [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=20261104220315.0cbf0ed2.ddiss@suse.de \
    --to=ddiss@suse.de \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thnkslprpt@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /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®