Re: Two vulnerabilities are founded,please confirm.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "Sam" == Samuel Tardieu <[email protected]> writes:

Sam> Would a simple fix like this one (untested) work?

Or rather (less likely to be in the path by putting it in
__find_get_block_slow):

Check that the requested block fits in the device.

Fix for advisory AD_LAB-06011 Linux kernel Filesystem Mount Dead Loop.

Signed-off-by: Samuel Tardieu <[email protected]>

diff -r db51efd75e66 fs/buffer.c
--- a/fs/buffer.c	Sun Sep 10 01:02:33 2006 +0200
+++ b/fs/buffer.c	Tue Sep 12 18:01:37 2006 +0200
@@ -393,6 +393,14 @@ __find_get_block_slow(struct block_devic
 	struct buffer_head *head;
 	struct page *page;
 	int all_mapped = 1;
+	char b[BDEVNAME_SIZE];
+
+	if (block >= bdev->bd_disk->capacity) {
+		printk(KERN_ERR "Invalid block number %Ld requested on device %s",
+		       (unsigned long long)block,
+		       bdevname(bdev, b));
+		return NULL;
+	}
 
 	index = block >> (PAGE_CACHE_SHIFT - bd_inode->i_blkbits);
 	page = find_get_page(bd_mapping, index);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux