[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6a99ecc3-ba7c-4687-9252-b4ea91ce9dfa@I-love.SAKURA.ne.jp>
Date: Tue, 10 Feb 2026 20:12:11 +0900
From: Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>
To: Viacheslav Dubeyko <slava@...eyko.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
glaubitz@...sik.fu-berlin.de, frank.li@...o.com, jkoolstra@...all.nl,
mehdi.benhadjkhelifa@...il.com, shardul.b@...ricsoftware.com
Subject: Re: [GIT PULL] hfs/hfsplus changes for 7.0-rc1
On 2026/02/07 9:26, Viacheslav Dubeyko wrote:
> Jori Koolstra has fixed the syzbot reported issue of triggering
> BUG_ON() in the case of corrupted superblock. This patch replaces
> the BUG_ON() in multiple places with proper error handling and
> resolves the syzbot reported bug.
I think that commit b226804532a8 ("hfs: Replace BUG_ON with error handling for CNID count checks") is incomplete.
Since atomic64_t is signed 64bits and U32_MAX is unsigned 32bits, the comparison
"if (atomic64_read(&sbi->next_id) > U32_MAX)" becomes false when sbi->next_id >= ((-1ULL) / 2) + 1.
I guess that a corrupted filesystem can have e.g. sbi->next_id == -1, and
"if (atomic64_read(&sbi->next_id) >> 32)" would check that the upper 32bits are all 0.
Also, I confirmed that this pull request did not include a fix for
https://syzkaller.appspot.com/bug?id=ee595bf9e099fff0610828e37bbbcdb7a2933f58 .
I'm waiting for next version of patch for this problem.
Powered by blists - more mailing lists