From: Michael Halcrow <mhalcrow@us.ibm.com>
To: akpm@osdl.org
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] eCryptfs: Fix pointer deref
Date: Tue, 31 Oct 2006 12:36:10 -0600 [thread overview]
Message-ID: <20061031183610.GA3230@us.ibm.com> (raw)
In-Reply-To: <20061030233637.GB21515@us.ibm.com>
On Mon, Oct 30, 2006 at 05:36:37PM -0600, Michael Halcrow wrote:
> + algified_name_len = (chaining_modifier_len + cipher_name_len + 3);
> + (*algified_name) = kmalloc(algified_name_len, GFP_KERNEL);
> + if (!(algified_name)) {
> + rc = -ENOMEM;
> + goto out;
> + }
I missed a pointer dereference in this kmalloc result check.
Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com>
---
fs/ecryptfs/crypto.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
b30f5b01ff79d9250dbd9e39db1c1aae7719c815
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 3f83613..9333fa3 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -134,7 +134,7 @@ int ecryptfs_crypto_api_algify_cipher_na
algified_name_len = (chaining_modifier_len + cipher_name_len + 3);
(*algified_name) = kmalloc(algified_name_len, GFP_KERNEL);
- if (!(algified_name)) {
+ if (!(*algified_name)) {
rc = -ENOMEM;
goto out;
}
--
1.3.3
next prev parent reply other threads:[~2006-10-31 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-30 23:32 [PATCH 0/6] eCryptfs: Crypto API updates and d_count fixes Michael Halcrow
2006-10-30 23:33 ` [PATCH 1/6] eCryptfs: Clean up crypto initialization Michael Halcrow
2006-10-30 23:35 ` [PATCH 2/6] eCryptfs: Hash code to new crypto API Michael Halcrow
2006-10-31 1:05 ` Herbert Xu
2006-10-30 23:36 ` [PATCH 3/6] eCryptfs: Cipher " Michael Halcrow
2006-10-31 18:36 ` Michael Halcrow [this message]
2006-10-30 23:37 ` [PATCH 4/6] eCryptfs: Consolidate lower dentry_open's Michael Halcrow
2006-10-30 23:38 ` [PATCH 5/6] eCryptfs: Remove ecryptfs_umount_begin Michael Halcrow
2006-10-30 23:41 ` [PATCH 6/6] eCryptfs: Fix handling of lower d_count Michael Halcrow
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=20061031183610.GA3230@us.ibm.com \
--to=mhalcrow@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.