From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Eslam Khafagy <eslam.medhat1993@gmail.com>
Cc: anna-maria@linutronix.de, frederic@kernel.org,
tglx@linutronix.de, syzkaller-bugs@googlegroups.com,
linux-kernel@vger.kernel.org,
syzbot+9c47ad18f978d4394986@syzkaller.appspotmail.com
Subject: Re: [PATCH] posix-timers: Fix potential memory leak in do_timer_create()
Date: Fri, 14 Nov 2025 12:29:19 +0300 [thread overview]
Message-ID: <aRb2b7ZGNxxGgW0o@grain> (raw)
In-Reply-To: <20251114050621.875131-1-eslam.medhat1993@gmail.com>
On Fri, Nov 14, 2025 at 07:06:21AM +0200, Eslam Khafagy wrote:
> 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 attemps to fix that.
>
> Reported-and-tested-by: syzbot+9c47ad18f978d4394986@syzkaller.appspotmail.com
> Closes: https://lore.kernel.org/all/69155df4.a70a0220.3124cb.0017.GAE@google.com/T/
> Fixes: ec2d0c04624b3c8a7eb1682e006717fa20cfbe24 ("posix-timers: Provide a mechanism to allocate a given timer ID")
> Signed-off-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
Simply move parameters check _before_ new timer allocation please, this way you won't
need new code at all :)
next prev parent reply other threads:[~2025-11-14 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-14 5:06 [PATCH] posix-timers: Fix potential memory leak in do_timer_create() Eslam Khafagy
2025-11-14 9:29 ` Cyrill Gorcunov [this message]
2025-11-14 11:53 ` 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=aRb2b7ZGNxxGgW0o@grain \
--to=gorcunov@gmail.com \
--cc=anna-maria@linutronix.de \
--cc=eslam.medhat1993@gmail.com \
--cc=frederic@kernel.org \
--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 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.