From: Petr Vorel <pvorel@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>,
linuxtestproject.agent@gmail.com, ltp@lists.linux.it,
Cyril Hrubis <chrubis@suse.cz>, Li Wang <li.wang@linux.dev>,
Martin Doucha <martin.doucha@suse.com>
Subject: Re: [LTP] cve: add pwnescape reproducer
Date: Thu, 5 Nov 2026 18:17:45 +0100 [thread overview]
Message-ID: <20261105171745.GB513115@pevik> (raw)
In-Reply-To: <20261105105023.GA459386@pevik>
Hi Andrea, all,
> Hi Andrea, all,
> I'm verifying it at least on some of SLES versions.
> FYI on 4.12 and 4.4 based SLES kernels with backported 6785011f8b16 (i.e. fixed
> kernels) the test fails:
> pwnescape.c:213: TBROK: control datagram was not forwarded back
OK, when I double checked the error was on version without the fix.
Therefore I merged your patchset with these changes:
+++ testcases/cve/pwnescape.c
@@ -21,6 +21,12 @@
* The test loads the tun module when run as root and runs inside a
* private network namespace so that it needs no other privileges.
*
+ * The frames carry two VID 0 VLAN tags because the TAP driver rejects
+ * checksum metadata starting less than ``sizeof(struct iphdr)`` bytes into
+ * the frame. Without the tags the IPv4 header would start at frame offset
+ * 14, so ``csum_start`` could not point at it. With the tags it starts at
+ * offset 22.
+ *
* [Algorithm]
*
* - create a TAP device with MAC 02:00:00:00:00:01, address
@@ -215,15 +221,19 @@ static void run(void)
tst_brk(TBROK, "control datagram IHL corrupted (%u)", ihl);
send_datagram(&test_frame, offsetof(struct pkt_frame, ip));
- if (capture_fragment(TEST_ID, &ihl) && ihl != GOOD_IHL) {
- tst_res(TFAIL,
- "IPv4 header IHL corrupted by checksum completion (%u)",
+ if (!capture_fragment(TEST_ID, &ihl)) {
+ tst_res(TPASS,
+ "kernel dropped the datagram with checksum metadata inside the IPv4 header");
+ return;
+ }
+
+ if (ihl != GOOD_IHL) {
+ tst_res(TFAIL, "IPv4 header IHL corrupted by checksum completion (%u)",
ihl);
return;
}
- tst_res(TPASS,
- "kernel dropped the datagram with checksum metadata inside the IPv4 header");
+ tst_res(TPASS, "IPv4 header not corrupted by checksum completion");
}
static void setup(void)
@@ -242,8 +252,12 @@ static void setup(void)
* namespace that owns the netns the file was opened in
*/
tap_fd = open("/dev/net/tun", O_RDWR);
- if (tap_fd < 0)
- tst_brk(TCONF | TERRNO, "open /dev/net/tun failed");
+ if (tap_fd == -1) {
+ if (errno == ENOENT || errno == ENODEV)
+ tst_brk(TCONF | TERRNO, "TUN support is missing");
+
+ tst_brk(TBROK | TERRNO, "open /dev/net/tun failed");
+ }
memset(&ifr, 0, sizeof(ifr));
strncpy(ifr.ifr_name, TAP_NAME, IFNAMSIZ - 1);
@@ -307,6 +321,7 @@ static struct tst_test test = {
},
.tags = (const struct tst_tag[]) {
{"linux-git", "6785011f8b16"},
+ {"CVE", "2026-99999"},
{}
},
};
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-11-05 17:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 16:22 [LTP] [PATCH v2] cve: add pwnescape reproducer Andrea Cervesato
2026-10-20 19:01 ` [LTP] " linuxtestproject.agent
2026-10-21 8:01 ` Andrea Cervesato via ltp
2026-11-05 10:50 ` Petr Vorel
2026-11-05 17:17 ` Petr Vorel [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-10-20 13:59 [LTP] [PATCH] " Andrea Cervesato
2026-10-20 14:51 ` [LTP] " linuxtestproject.agent
2026-10-20 16:22 ` 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=20261105171745.GB513115@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.com \
--cc=chrubis@suse.cz \
--cc=li.wang@linux.dev \
--cc=linuxtestproject.agent@gmail.com \
--cc=ltp@lists.linux.it \
--cc=martin.doucha@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox