[PATCH] jfs: nlink overflow in jfs_rename
From: Jori Koolstra
Date: Mon Dec 01 2025 - 08:23:58 EST
Below syzbot bug has not been fixed yet. If anyone has time I would
greatly appreciate a review of my patch, so it can be moved along.
It has been sitting for quite a few weeks.
Thanks,
Jori.
> Op 28-10-2025 13:22 CET schreef Jori Koolstra <jkoolstra@xxxxxxxxx>:
>
>
> If nlink is maximal for a directory (-1) and inside that directory you
> perform a rename for some child directory (not moving from the parent),
> then the nlink of the first directory is first incremented and later
> decremented. Normally this is fine, but when nlink = -1 this causes a
> wrap around to 0, and then drop_nlink issues a warning.
>
> After applying the patch syzbot no longer issues any warnings. I also
> ran some basic fs tests to look for any regressions.
>
> Signed-off-by: Jori Koolstra <jkoolstra@xxxxxxxxx>
> Reported-by: syzbot+9131ddfd7870623b719f@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzbot.org/bug?extid=9131ddfd7870623b719f