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-next>] [day] [month] [year] [list]
Message-ID: <CAG3eYYSRpBUcSMSbxXTKCFtm1BiRACVvFd77nVb641QYQZWHPQ@mail.gmail.com>
Date:	Fri, 18 Oct 2013 20:07:44 +0200
From:	Péter András Felvégi <petschy@...il.com>
To:	Jan Kara <jack@...e.cz>
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH v2] udf: fix for pathetic mount times in case of invalid file system

From: Peter A. Felvegi <petschy@...il.com>

The UDF driver was not strict enough about checking the IDs in the
VSDs when mounting, which resulted in reading through all the sectors
of the block device in some unfortunate cases. Eg, trying to mount my
uninitialized 200G SSD partition (all 0xFF bytes) took ~350 minutes to
fail, because the code expected some of the valid IDs or a zero byte.
During this, the mount couldn't be killed, sync from the cmdline
blocked, and the machine froze into the shutdown. Valid filesystems
(extX, btrfs, ntfs) were rejected by the mere accident of having a
zero byte at just the right place in some of their sectors, close
enough to the beginning not to generate excess I/O. The fix adds a
hard limit on the VSD sector offset, adds the two missing VSD IDs, and
stops scanning when encountering an invalid ID. Also replaced the
magic number 32768 with a more meaningful #define, and supressed the
bogus message about failing to read the first sector if no UDF fs was
detected.

Signed-off-by: Peter A. Felvegi <petschy@...il.com>
---
The fix was developed for 3.9.4, and applies to 3.12-rc3, too.

patch v2: edited the code so that added/changed lines are not longer than
80 chars. sending the patch as an attachment, as gmail messes it up
otherwise.

Download attachment "udf.patch" of type "application/octet-stream" (3752 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ