From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: linuxtestproject.agent@gmail.com
Cc: ltp@lists.linux.it
Subject: Re: [LTP] Add test for CVE 2026-53362
Date: Wed, 22 Jul 2026 07:36:59 +0000 [thread overview]
Message-ID: <6a60731c.9e856a68.1de8b6.5ec6@mx.google.com> (raw)
In-Reply-To: <20260721192815.8592-1-linuxtestproject.agent@gmail.com>
Hi Martin,
> This high-level description block opens with a plain `/*` instead of
> `/*\`. setsockopt10.c (and the rest of the test suite) uses `/*\` for
> this block, since it gets exported into the RST-based test catalog.
>
> As written, this stays a regular comment and will not show up in the
> generated documentation. Could this be changed to `/*\`?
This is correct.
>
> > + /* Splice input pipe buffer page into socket */
> > + memset(buf, 0, TEST_MSGSIZE);
> > + buf[TEST_MSGSIZE - 6] = 1;
> > + SAFE_WRITE(SAFE_WRITE_ALL, pipefds[1][1], buf, TEST_MSGSIZE);
> > + splice(pipefds[1][0], NULL, sockfd, NULL, TEST_MSGSIZE, SPLICE_F_MORE);
> > + tee(pipefds[0][0], pipefds[1][1], PATTERN_SIZE, 0);
> > + splice(pipefds[1][0], NULL, sockfd, NULL, PATTERN_SIZE, SPLICE_F_MORE);
>
> The file already includes "lapi/splice.h", which provides
> `SAFE_SPLICE()`. Both splice() calls here use the bare syscall
> instead, so their return value is discarded. If either call fails or
> returns short, the reproduction sequence silently doesn't happen and
> the iteration would just report TPASS without having exercised
> anything. Would SAFE_SPLICE() be preferable here?
mmmh is this the case where splice() is supposed to fail but triggering
the CVE into the kernel? if so, we probably need to add a short comment
so we know that SAFE_SPLICE() is not a good choice.
>
> > + for (i = 0; i < PIPE_COUNT; i++) {
> > + SAFE_CLOSE(pipefds[i][0]);
> > + SAFE_CLOSE(pipefds[i][1]);
> > + }
>
> pipefds[][] (and sockfd, closed a few lines above) are not reset to -1
> after being closed here; only setup() initializes them to -1, once.
> cleanup() decides whether a descriptor needs closing with a `>= 0`
> check.
>
> Since leak_pipe() runs in a loop (up to 64 times), if SAFE_PIPE() or
> SAFE_SOCKET() at the start of a later iteration fails (pipe(2)/
> socket(2) can fail with EMFILE/ENFILE/ENOMEM) before refreshing a
> given slot, cleanup() would see the stale, already-closed descriptor
> number from the previous iteration as still open and try to close it
> again. Would it make sense to reset the relevant slot to -1 right
> after each close?
Again, I updated the agent but it's still asking for this. Please ignore
it, I will need to update the agent in a proper way. There's probably
some logic flaw in the rules at the moment.
Thanks,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-07-22 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 15:39 [LTP] [PATCH] Add test for CVE 2026-53362 Martin Doucha
2026-07-21 19:28 ` [LTP] " linuxtestproject.agent
2026-07-22 7:36 ` Andrea Cervesato via ltp [this message]
2026-07-22 14:51 ` Martin Doucha
2026-07-23 12:24 ` [LTP] [PATCH] " Andrea Cervesato via ltp
2026-07-28 7:17 ` Andrea Cervesato via ltp
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=6a60731c.9e856a68.1de8b6.5ec6@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=linuxtestproject.agent@gmail.com \
/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.