[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250321050352.GB1161423@mit.edu>
Date: Fri, 21 Mar 2025 01:03:52 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Qasim Ijaz <qasdev00@...il.com>
Cc: adilger.kernel@...ger.ca, shikemeng@...weicloud.com,
linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH RESEND] ext4: Fix potential NULL pointer dereferences in
test_mb_mark_used() and test_mb_free_blocks()
On Thu, Mar 13, 2025 at 12:00:21AM +0000, Qasim Ijaz wrote:
> test_mb_mark_used() and test_mb_free_blocks() call kunit_kzalloc() to
> allocate memory, however both fail to ensure that the allocations
> succeeded. If kunit_kzalloc() returns NULL, then dereferencing the
> corresponding pointer without checking for NULL will lead to
> a NULL pointer dereference.
>
> To fix this call KUNIT_ASSERT_NOT_ERR_OR_NULL() to ensure
> the allocation succeeded.
Thanks; other folks have sent this fix.
- Ted
Powered by blists - more mailing lists