* a huge ntfs log file can cause log_read_rst() to loop forever
@ 2024-01-29 18:21 rtm
0 siblings, 0 replies; only message in thread
From: rtm @ 2024-01-29 18:21 UTC (permalink / raw)
To: almaz.alexandrovich; +Cc: ntfs3
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
I've attached an ntfs image that causes log_read_rst() to loop forever.
If the ntfs log file has a length near 2^32, then this for-loop in log_read_rst():
u32 skip, vbo;
if (first) {
vbo = 0;
skip = 512;
} else {
vbo = 512;
skip = 0;
}
for (; vbo < l_size; vbo = 2 * vbo + skip, skip = 0) {
will cause vbo to wrap around to zero, at which point (since skip will
also be zero) the loop won't terminate.
# uname -a
Linux ubuntu66 6.7.0-11091-g296455ade1fd #5 SMP PREEMPT_DYNAMIC Fri Jan 19 15:38:07 EST 2024 x86_64 x86_64 x86_64 GNU/Linux
# gunzip -c < ntfs39a.img.gz > ntfs39a.img
# mount -t ntfs3 -o loop,rw junk /mnt
... never returns
Robert Morris
rtm@csail.mit.edu
[-- Attachment #2: ntfs39a.img.gz --]
[-- Type: application/octet-stream, Size: 124399 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-29 18:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-29 18:21 a huge ntfs log file can cause log_read_rst() to loop forever rtm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox