From: "Jiakai Xu" <xujiakai2025@iscas.ac.cn>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "Yangtao Li" <frank.li@vivo.com>,
"John Paul Adrian Glaubitz" <glaubitz@physik.fu-berlin.de>,
"Viacheslav Dubeyko" <slava@dubeyko.com>,
2200013188@stu.pku.edu.cn
Subject: [BUG] Recursive locking deadlock in hfsplus
Date: Mon, 1 Dec 2025 18:51:44 +0800 (GMT+08:00) [thread overview]
Message-ID: <40aee9ba.3b455.19ad98a3245.Coremail.xujiakai2025@iscas.ac.cn> (raw)
Hi,
I discovered a recursive locking bug in the hfsplus filesystem through fuzzing
and successfully reproduced it on Linux mainline (v6.18).
The issue occurs when hfsplus_file_extend() holds extents_lock while calling
hfsplus_block_allocate(), which may trigger I/O that recursively calls
hfsplus_get_block(), which then tries to acquire the same extents_lock again.
Call chain:
hfsplus_file_extend()
└─ mutex_lock(&hip->extents_lock)
hfsplus_block_allocate()
└─ ...
└─ hfsplus_get_block()
└─ mutex_lock(&hip->extents_lock) ← recursive locking
Details: https://github.com/j1akai/temp/tree/main/20251201
Best regards,
Jiakai Xu
reply other threads:[~2025-12-01 10:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40aee9ba.3b455.19ad98a3245.Coremail.xujiakai2025@iscas.ac.cn \
--to=xujiakai2025@iscas.ac.cn \
--cc=2200013188@stu.pku.edu.cn \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).