lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251109141620.58007-1-jkoolstra@xs4all.nl>
Date: Sun,  9 Nov 2025 15:16:20 +0100
From: Jori Koolstra <jkoolstra@...all.nl>
To: jack@...e.cz
Cc: brauner@...nel.org,
	gregkh@...uxfoundation.org,
	jlayton@...nel.org,
	juntong.deng@...look.com,
	linux-kernel-mentees@...ts.linuxfoundation.org,
	linux-kernel@...r.kernel.org,
	syzbot+2f142b57f2af27974fda@...kaller.appspotmail.com,
	syzbot+5ad0824204c7bf9b67f2@...kaller.appspotmail.com,
	xiubli@...hat.com,
	jkoolstra@...all.nl,
	skhan@...uxfoundation.org,
	david.shane.hunter@...il.com
Subject: Re: [PATCH] fs/minix: Improve validity checking of superblock


Hi Jan,

> Also s_log_zone_size is odd. Looking at how it is treated within the code
> it only matters for reporting of free blocks (but zone bitmap is really
> treated as having one bit per block) so I don't think we really support
> anything else than 0 there but that would need confirmation by someone more
> knowledgeable with the code.

You are right Jan, there is no support for anything else than s_log_zone_size
= 0. In fact, for minix v3, the reference implementation has

  /* Zones consisting of multiple blocks are longer supported, so fail as early
   * as possible. There is still a lot of code cleanup to do here, though.
   */
  if (sp->s_log_zone_size != 0) {
	printf("MFS: block and zone sizes are different\n");
	return EINVAL;
  }

Older versions of mfs apparently did support multiblock zone sizes.

There are more (small) issues with the code. For instance,

> Also based on http://ohm.hgesser.de/sp-ss2012/Intro-MinixFS.pdf I think
> s_firstdatazone is constrained even more (since there must be inode bitmap,
> zone bitmap, and inode table before it).

firstdatazone should not be used normally. Better to calculate it in place.
Also, in minix_new_node ENOSPC is returned if (!j || j > sbi->s_ninodes).
However, this is really a EFSCORRUPTED as it should never happen.

I have been going through the code in detail to see how best to move it to
FUSE. Probably it is a good idea to write some sort of adapter so that as
few changes as possible are needed to the current implementation. Such
an approach is also more likely to work for more complicated deprecated
filesystems. But I have to see if I can bounce some ideas on someone more
knowledgeable.

I can submit patches for these issues in the mean time if you think that is
useful. Otherwise, I will include it whenever I finish the FUSE driver.

thanks,
Jori.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ