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:
fa71f44
)
[CIFS] possible memory corruption on mount
author
Steve French
<
[email protected]
>
Thu, 18 Aug 2011 04:41:55 +0000
(
04:41
+0000)
committer
Steve French
<
[email protected]
>
Thu, 18 Aug 2011 16:53:02 +0000
(16:53 +0000)
CIFS cleanup_volume_info_contents() looks like having a memory
corruption problem.
When UNCip is set to "&vol->UNC[2]" in cifs_parse_mount_options(), it
should not be kfree()-ed in cleanup_volume_info_contents().
Introduced in commit
b946845a9dc523c759cae2b6a0f6827486c3221a
Signed-off-by: J.R. Okajima <
[email protected]
>
Reviewed-by: Jeff Layton <
[email protected]
>
CC: Stable <
[email protected]
>
Signed-off-by: Steve French <
[email protected]
>
fs/cifs/connect.c
patch
|
blob
|
history
diff --git
a/fs/cifs/connect.c
b/fs/cifs/connect.c
index 80c2e3add3a2714748336560b249b77e348c4278..633c246b67752efe0f7460cb01e8ac62309314e8 100644
(file)
--- a/
fs/cifs/connect.c
+++ b/
fs/cifs/connect.c
@@
-2878,7
+2878,8
@@
cleanup_volume_info_contents(struct smb_vol *volume_info)
kfree(volume_info->username);
kzfree(volume_info->password);
kfree(volume_info->UNC);
- kfree(volume_info->UNCip);
+ if (volume_info->UNCip != volume_info->UNC + 2)
+ kfree(volume_info->UNCip);
kfree(volume_info->domainname);
kfree(volume_info->iocharset);
kfree(volume_info->prepath);