All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v1] tst_tmpdir: Fix buffer overflow in tst_tmpdir.c
Date: Thu, 22 May 2025 21:39:10 +0200	[thread overview]
Message-ID: <20250522193910.GA28496@pevik> (raw)
In-Reply-To: <20250521141655.3202240-1-wegao@suse.com>

Hi Wei, all,

@all: is this a candidate for a release? It'd be nice to get it fixed.

> Using sprintf without length checking in tst_tmpdir may lead to buffer overflow.
> So in this patch use openat() instead of open().

LGTM, but it'd be nice if we could use only rmobjat().

Could you please remove the unused variable?

tst_tmpdir.c: In function ‘rmobjat’:
tst_tmpdir.c:327:21: warning: unused variable ‘statbuf’ [-Wunused-variable]
  327 |         struct stat statbuf;
      |                     ^~~~~~~


Suggested-by: Cyril Hrubis <chrubis@suse.cz>

> Fixs:1241

This is better as it shows link in GitHub web:
Fixes: #1241

Or, IMHO better
Fixes: https://github.com/linux-test-project/ltp/issues/1241

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2025-05-22 19:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 14:16 [LTP] [PATCH v1] tst_tmpdir: Fix buffer overflow in tst_tmpdir.c Wei Gao via ltp
2025-05-22 19:39 ` Petr Vorel [this message]
2025-05-23  6:01   ` Jan Stancek via ltp
2025-05-23  6:29     ` Petr Vorel
2025-05-23  6:29     ` Cyril Hrubis
2025-05-23 21:09 ` [LTP] [PATCH v2] " Wei Gao via ltp
2025-11-13 14:38   ` Cyril Hrubis
2025-11-14  8:58     ` Petr Vorel
2025-11-25  4:39       ` Wei Gao via ltp
2025-11-25  4:36     ` Wei Gao via ltp
2025-11-25  4:40   ` [LTP] [PATCH v3] " Wei Gao via ltp
2026-02-17 15:01     ` Andrea Cervesato via ltp
2026-02-25  1:50     ` [LTP] [PATCH v4] " Wei Gao via ltp
2026-02-25  7:38       ` Andrea Cervesato via ltp
2026-02-25  7:38       ` Andrea Cervesato via ltp
2026-02-25 10:58       ` Cyril Hrubis
2026-02-26  1:34         ` Wei Gao via ltp
2026-02-26  8:59           ` Cyril Hrubis
2026-02-26  9:36             ` Andrea Cervesato via ltp
2026-02-26 12:26               ` Cyril Hrubis
2025-09-01 15:08 ` [LTP] [PATCH v1] " 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=20250522193910.GA28496@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=wegao@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 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.