From: linuxtestproject.agent@gmail.com
To: Jinseok Kim <always.starving0@gmail.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] fsx-linux: Fix reference buffer corruption in op_map_read()
Date: Mon, 17 Aug 2026 16:29:02 +0000 [thread overview]
Message-ID: <20260817162902.8968-1-linuxtestproject.agent@gmail.com> (raw)
In-Reply-To: <20260817154048.3854-1-always.starving0@gmail.com>
Hi Jinseok,
On Tue, 18 Aug 2026, Jinseok Kim wrote:
> fsx-linux: Fix reference buffer corruption in op_map_read()
--- [PATCH 2/2] ---
> + max_len = fsize - pos->offset;
> + if (max_len > op_max_size)
> + max_len = op_max_size;
> +
> + pos->size = random() % max_len;
>
> diff = pos->offset % align;
>
> if (diff) {
> pos->offset -= diff;
> pos->size += diff;
> }
Could the offset be aligned before max_len is calculated, or could the final
size be capped after alignment?
The new cap bounds pos->size only before offset % align is added back. With
-o 1 -w 4096, pos->size starts at zero and can then grow to 4095 bytes, so
-o still is not an upper bound. This also affects the existing fsx05 entry,
which combines -o 1024 with -w 4096.
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
prev parent reply other threads:[~2026-08-17 16:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 15:40 [LTP] [PATCH v1 1/2] fsx-linux: Fix reference buffer corruption in op_map_read() Jinseok Kim
2026-08-17 15:40 ` [LTP] [PATCH v1 2/2] fsx-linux: Fix op_max_size handling in op_file_position() Jinseok Kim
2026-08-17 16:29 ` linuxtestproject.agent [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=20260817162902.8968-1-linuxtestproject.agent@gmail.com \
--to=linuxtestproject.agent@gmail.com \
--cc=always.starving0@gmail.com \
--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.