Skip to contentSkip to conversation

integer parsing overflow in zonefs_fname_to_fno()

DISCUSSION Alexey Dobriyan 1 participant 1 message Apr 25 VFS

lore
Share & tools
lore
#0 lore raw

zonefs_fname_to_fno() does

	fno += (c - '0') * shift;
	shift *= 10;

which is obviously broken because integer overflow and string, coming from userspace, can't be trusted.

Also, zonefs_lookup() could use is_root_inode() helper.