projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9276910
)
nfsd4: memory corruption in numeric_name_to_id()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 28 Mar 2012 10:44:59 +0000
(13:44 +0300)
committer
J. Bruce Fields
<bfields@redhat.com>
Wed, 28 Mar 2012 14:10:23 +0000
(10:10 -0400)
"id" is type is a uid_t (32 bits) but on 64 bit systems strict_strtoul()
modifies 64 bits of data. We should use kstrtouint() instead.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4idmap.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfs4idmap.c
b/fs/nfsd/nfs4idmap.c
index 69ca9c5bb600e5c7727e933d0418e756019f700b..322d11ce06a452858ed0e547cf1e70e7883c08ee 100644
(file)
--- a/
fs/nfsd/nfs4idmap.c
+++ b/
fs/nfsd/nfs4idmap.c
@@
-581,7
+581,7
@@
numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namel
/* Just to make sure it's null-terminated: */
memcpy(buf, name, namelen);
buf[namelen] = '\0';
- ret =
strict_strtoul(name, 10, (unsigned long *)
id);
+ ret =
kstrtouint(name, 10,
id);
return ret == 0;
}