mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
nfsd4: memory corruption in numeric_name_to_id()
"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 <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
92769108f5
commit
3af706135b
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue