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>] [day] [month] [year] [list]
Message-ID: <20240916221211.GC3107530@ZenIV>
Date: Mon, 16 Sep 2024 23:12:11 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Daniel Yang <danielyangkang@...il.com>
Cc: Namjae Jeon <linkinjeon@...nel.org>,
	Sungjong Seo <sj1557.seo@...sung.com>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	syzbot+e1c69cadec0f1a078e3d@...kaller.appspotmail.com
Subject: Re: [PATCH v2] fs/exfat: resolve memory leak from
 exfat_create_upcase_table()

On Mon, Sep 16, 2024 at 02:58:43PM -0700, Daniel Yang wrote:

> In exfat_create_upcase_table, ENOMEM and EINVAL result in a jump to
> exfat_load_default_upcase_table where memory is also allocated. Since
> ENOMEM doesn't allocate memory, freeing null addresses will result in a
> double free.

Freeing null address is a no-op.  Explicitly guaranteed, for the
same reason why C standard guarantees that free(NULL) is a no-op.
So you don't need to check if allocation had been done.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ