linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udf: Suspicious values in udf_statfs()
@ 2020-01-12 16:23 Pali Rohár
  2020-01-13 12:08 ` Jan Kara
  0 siblings, 1 reply; 8+ messages in thread
From: Pali Rohár @ 2020-01-12 16:23 UTC (permalink / raw)
  To: linux-fsdevel, Jan Kara

[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

Hello,

I looked at udf_statfs() implementation and I see there two things which
are probably incorrect:

First one:

	buf->f_blocks = sbi->s_partmaps[sbi->s_partition].s_partition_len;

If sbi->s_partition points to Metadata partition then reported number
of blocks seems to be incorrect. Similar like in udf_count_free().

Second one:

	buf->f_files = (lvidiu != NULL ? (le32_to_cpu(lvidiu->numFiles) +
					  le32_to_cpu(lvidiu->numDirs)) : 0)
			+ buf->f_bfree;

What f_files entry should report? Because result of sum of free blocks
and number of files+directories does not make sense for me.

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-20 17:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 16:23 udf: Suspicious values in udf_statfs() Pali Rohár
2020-01-13 12:08 ` Jan Kara
2020-01-16 15:30   ` Pali Rohár
2020-01-17 11:38     ` Jan Kara
2020-01-17 22:35       ` Pali Rohár
2020-01-17 12:05   ` Jan Kara
2020-01-18  0:11     ` Pali Rohár
2020-01-20 13:02       ` Jan Kara

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).