lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aRb2b7ZGNxxGgW0o@grain>
Date: Fri, 14 Nov 2025 12:29:19 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Eslam Khafagy <eslam.medhat1993@...il.com>
Cc: anna-maria@...utronix.de, frederic@...nel.org, tglx@...utronix.de,
	syzkaller-bugs@...glegroups.com, linux-kernel@...r.kernel.org,
	syzbot+9c47ad18f978d4394986@...kaller.appspotmail.com
Subject: Re: [PATCH] posix-timers: Fix potential memory leak in
 do_timer_create()

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@...kaller.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@...il.com>

Simply move parameters check _before_ new timer allocation please, this way you won't
need new code at all :)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ