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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239652637.1127.10.camel@oberon>
Date:	Mon, 13 Apr 2009 15:57:17 -0400
From:	Doug Chapman <doug.chapman@...com>
To:	linux-kernel <linux-kernel@...r.kernel.org>
Cc:	phillip@...gher.demon.co.uk
Subject: [PATCH] squashfs broken when pageszie > blocksize

Squashfs is broken on any system where the pageszie is larger than either
the block size of the squashfs image or larger than the metadata size (8192).
This is easily fixed by ensuring cache->pages is always > 0.

Signed-off-by: Doug Chapman <doug.chapman@...com>
Cc: Phillip Lougher <phillip@...gher.demon.co.uk>

---
diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c
index 1c4739e..c31aa89 100644
--- a/fs/squashfs/cache.c
+++ b/fs/squashfs/cache.c
@@ -252,6 +252,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries,
 	cache->entries = entries;
 	cache->block_size = block_size;
 	cache->pages = block_size >> PAGE_CACHE_SHIFT;
+	cache->pages = cache->pages?cache->pages:1;
 	cache->name = name;
 	cache->num_waiters = 0;
 	spin_lock_init(&cache->lock);


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ