[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <498AD58B.5000805@ph.tum.de>
Date: Thu, 05 Feb 2009 13:03:23 +0100
From: Thiemo Nagel <thiemo.nagel@...tum.de>
To: Ext4 Developers List <linux-ext4@...r.kernel.org>,
Theodore Tso <tytso@....edu>
Subject: [RFC] ext4_bmap() may return blocks outside filesystem
Hello,
during testing of ext4 with intentionally corrupted filesystem images I
noticed that sometimes ext4_bmap() returns physical block numbers which
lie outside of the filesystem. In most cases, the error is caught by
the block layer (?) leading to error messages of the kind:
attempt to access beyond end of device
loop0: rw=0, want=xxx, limit=xxx
But there also are cases which are not handled gracefully by bmap() callers.
I've attached a conceptual patch against 2.6.29-rc2 which fixes one case
in which invalid block numbers are returned (there might be more) by
adding sanity checks to ext4_ext_find_extent(), but before I start
looking for further occurences, I'd like to ask whether you think my
approach is reasonable.
Kind regards,
Thiemo Nagel
View attachment "concept.patch" of type "text/x-patch" (789 bytes)
Powered by blists - more mailing lists