mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 05:27:44 +00:00
afs: Clear pioctl data interchange buffer before use
Avoid leaking data in pioctl interchange buffers; clear the memory when one is allocated. FIXES 131892 (CVE-2015-3284) (cherry picked from commit 592a99d6e693bc640e2bdfc2e7e5243fcedc8f93) Change-Id: I90fef404978bd7aae3eb88836bcd4f95587fd45c
This commit is contained in:
parent
eea466507a
commit
d4cd578076
@ -62,6 +62,11 @@ afs_pd_alloc(struct afs_pdata *apd, size_t size)
|
||||
if (apd->ptr == NULL)
|
||||
return ENOMEM;
|
||||
|
||||
if (size > AFS_LRALLOCSIZ)
|
||||
memset(apd->ptr, 0, size + 1);
|
||||
else
|
||||
memset(apd->ptr, 0, AFS_LRALLOCSIZ);
|
||||
|
||||
apd->remaining = size;
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user