public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Stephan Müller" <smueller@chronox.de>
To: linux-kernel@vger.kernel.org, akpm@osdl.org
Cc: Michael Halcrow <mhalcrow@us.ibm.com>
Subject: [PATCH 04/06] ecryptfs: Use the passed-in max value as the upper bound.
Date: Tue, 27 Jun 2006 01:47:59 +0200	[thread overview]
Message-ID: <200606270147.59754.smueller@chronox.de> (raw)

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;

                 reply	other threads:[~2006-06-26 23:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606270147.59754.smueller@chronox.de \
    --to=smueller@chronox.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhalcrow@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox