public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 04/06] ecryptfs: Use the passed-in max value as the upper bound.
@ 2006-06-26 23:47 Stephan Müller
  0 siblings, 0 replies; only message in thread
From: Stephan Müller @ 2006-06-26 23:47 UTC (permalink / raw)
  To: linux-kernel, akpm; +Cc: Michael Halcrow

Kernel version: 2.6.17-mm1

Function encrypted_session_key_set is given a maximum length it is allowed 
to write. This patch makes this function to obey this length.

Signed-off-by: Stephan Mueller <smueller@chronox.de>

---

 fs/ecryptfs/keystore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

f64944018925812338c59adab29982be8f963386
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index efcf00a..4b9b742 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -929,7 +929,7 @@ encrypted_session_key_set:
 	/* TODO: Packet size limit */
 	/* We have 5 bytes of surrounding packet data */
 	if ((0x05 + ECRYPTFS_SALT_SIZE
-	     + (*key_rec).enc_key_size) >= PAGE_CACHE_SIZE) {
+	     + (*key_rec).enc_key_size) >= max) {
 		ecryptfs_printk(KERN_ERR, "Authentication token is too "
 				"large\n");
 		rc = -EINVAL;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-26 23:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 23:47 [PATCH 04/06] ecryptfs: Use the passed-in max value as the upper bound Stephan Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox