From: Frederic Weisbecker <frederic@kernel.org>
To: Eslam Khafagy <eslam.medhat1993@gmail.com>
Cc: anna-maria@linutronix.de, tglx@linutronix.de, gorcunov@gmail.com,
syzkaller-bugs@googlegroups.com, linux-kernel@vger.kernel.org,
syzbot+9c47ad18f978d4394986@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] posix-timers: Fix potential memory leak in do_timer_create()
Date: Fri, 14 Nov 2025 14:52:12 +0100 [thread overview]
Message-ID: <aRc0DDW-HrulilN6@localhost.localdomain> (raw)
In-Reply-To: <20251114122739.994326-1-eslam.medhat1993@gmail.com>
Le Fri, Nov 14, 2025 at 02:27:39PM +0200, Eslam Khafagy a écrit :
> potential memory leak may happen if user space pointer created_timer_id
> is invallid. or the value it points to is invalid. the call will
> prematurely return.
> However it doesn't free the memory it allocates with
> alloc_posix_timer(). This patch attempts to fix that by moving parameter
> check before alloc_posix_timer().
>
> Reported-by: syzbot+9c47ad18f978d4394986@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/all/69155df4.a70a0220.3124cb.0017.GAE@google.com/T/
> Fixes: ec2d0c04624b3 ("posix-timers: Provide a mechanism to allocate a given timer ID")
> Suggested-by: Cyrill Gorcunov <gorcunov@gmail.com>
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
--
Frederic Weisbecker
SUSE Labs
next prev parent reply other threads:[~2025-11-14 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 12:27 [PATCH v2] posix-timers: Fix potential memory leak in do_timer_create() Eslam Khafagy
2025-11-14 13:52 ` Frederic Weisbecker [this message]
2025-11-14 16:02 ` [tip: timers/urgent] posix-timers: Plug " tip-bot2 for Eslam Khafagy
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=aRc0DDW-HrulilN6@localhost.localdomain \
--to=frederic@kernel.org \
--cc=anna-maria@linutronix.de \
--cc=eslam.medhat1993@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+9c47ad18f978d4394986@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tglx@linutronix.de \
/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