All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Anh Nguyen Hoang" <anhnh.4work@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf trace: Fix heap overflow when -e expands a syscall alias
Date: Wed, 02 Dec 2026 16:05:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-246190@kernel.org> (raw)
In-Reply-To: <20261202-kbug-l947-v1-1-9c324b56cea5@gmail.com>

> From: Anh Nguyen Hoang <anhnh.4work@gmail.com>
> 
> trace__parse_events_option() splits the -e argument into a list of
> syscalls and a list of other events. Both lists are allocated with
> strlen(str) + 1 bytes, which is enough only as long as every name copied
> into them is a piece of the argument.
> 
> That stopped being true when the syscall alias lookup was added: a name
> that is not in the syscall table but matches an alias in syscall_fmts[]
> is replaced with the canonical name, which can be longer than what the
> user typed: "pread" becomes "preadv", "umount" becomes "umount2" and
> "fstatat" becomes "newfstatat". The strcpy() and sprintf() calls then
> write past the end of the allocation.
> 
> Short overruns land in the allocator's padding and go unnoticed, so the
> [ ... ]
> 
> Found by an automated code-checking tool.
> 
> Fixes: f932184e282f ("perf trace: Consider syscall aliases too")
> Signed-off-by: Anh Nguyen Hoang <anhnh.4work@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-kbug-l947-v1-1-9c324b56cea5@gmail.com?part=1

      reply	other threads:[~2026-12-02 16:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 15:58 [PATCH] perf trace: Fix heap overflow when -e expands a syscall alias Anh Nguyen Hoang
2026-12-02 15:58 ` Anh Nguyen Hoang via B4 Relay
2026-12-02 16:05 ` sashiko-bot [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=sashiko-outbox-246190@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anhnh.4work@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.