From: linuxtestproject.agent@gmail.com
To: Martin Doucha <mdoucha@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] Add test for CVE 2026-53362
Date: Tue, 21 Jul 2026 19:28:15 +0000 [thread overview]
Message-ID: <20260721192815.8592-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260721153917.64722-1-mdoucha@suse.cz>
Hi Martin,
On Tue, 21 Jul 2026, Martin Doucha wrote:
> Add test for CVE 2026-53362
> +/*
> + * CVE 2026-53362
> + *
> + * Test for vulnerability in socket buffer size calculation for fragmented
> + * UDP packets with gaps. Reproducer based on:
> + * https://github.com/sgkdev/ipv6_frag_escape
> + *
> + * Memory corruption fixed in kernel v7.2:
> + * 736b380e28d0 ("ipv6: account for fraggap on the paged allocation path")
> + */
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 `/*\`?
> + /* 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?
> + 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?
Verdict - Needs revision
---
Note:
The agent can sometimes produce false positives although often its
findings are genuine. If you find issues with the review, please
comment this email or ignore the suggestions.
Regards,
LTP AI Reviewer
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-07-21 19:28 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 ` linuxtestproject.agent [this message]
2026-07-22 7:36 ` [LTP] " Andrea Cervesato via ltp
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=20260721192815.8592-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=mdoucha@suse.cz \
/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.