From: linuxtestproject.agent@gmail.com
To: Andrea Cervesato <andrea.cervesato@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] cve: reproducer for cve-2026-64600
Date: Fri, 24 Jul 2026 17:56:24 +0000 [thread overview]
Message-ID: <20260724175624.8856-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260724-cve-2026-64600-v2-1-c039960448f6@suse.com>
Hi Andrea,
On 2026-07-24, Andrea Cervesato wrote:
> cve: reproducer for cve-2026-64600
> +static void cleanup(void)
> +{
> + stop_pressure_threads();
> +
> + if (barrier_initialized)
> + SAFE_PTHREAD_BARRIER_DESTROY(&barrier);
> +
> + if (target_dio_fd != -1)
> + SAFE_CLOSE(target_dio_fd);
> +
> + if (target_fd != -1)
> + SAFE_CLOSE(target_fd);
> +
> + if (clone_fd != -1)
> + SAFE_CLOSE(clone_fd);
> +
> + free(tbuf);
> + free(wbuf);
> + free(rbuf);
> +}
The header comment says "Root privilege is regained in cleanup() so
the library can unmount the loop device", but cleanup() never calls
SAFE_SETEUID(0)/SAFE_SETEGID(0). setup() drops to "nobody" via
drop_privileges() and nothing restores euid/egid afterwards.
Other tests that drop privileges the same way restore them in
cleanup(), e.g. chmod06.c, acct01.c, creat06.c all call
SAFE_SETEUID(0) there. Per capabilities(7), effective capabilities are
cleared once euid moves away from 0, so the process is still
unprivileged when cleanup() returns. The library's subsequent unmount
of the loop device would then fail with EPERM, leaving the mount and
loop device attached.
Is a SAFE_SETEUID(0) (and SAFE_SETEGID(0)) call missing at the start
of cleanup()?
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-24 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 12:54 [LTP] [PATCH v2] cve: reproducer for cve-2026-64600 Andrea Cervesato
2026-07-24 17:56 ` linuxtestproject.agent [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-07-24 8:28 [LTP] [PATCH] " Andrea Cervesato
2026-07-24 9:25 ` [LTP] " linuxtestproject.agent
2026-07-24 9:28 ` Cyril Hrubis
2026-07-24 9:31 ` Andrea Cervesato via ltp
2026-07-24 10:24 ` Cyril Hrubis
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=20260724175624.8856-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=andrea.cervesato@suse.de \
--cc=ltp@lists.linux.it \
/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.