REDHAT-BUG-732869: High severity linux cifs vulnerability
The namelen variable in CIFSFindNext is a signed int that gets set to the resumenamelen in the cifssearchinfo. The resumenamelen however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server.
If the server sends a very large value for this, then that value could look negative when converted to a signed int. That would make that value pass the PATHMAX check later in CIFSFindNext. The namelen would then be used as a length value for a memcpy. It would then be treated as unsigned again, and the memcpy scribbles over a ton of memory.
Fix this by making the namelen an unsigned value in CIFSFindNext.
http://www.spinics.net/lists/linux-cifs/msg03950.html
Acknowledgements:
Red Hat would like to thank Darren Lavender for reporting this issue.
Affected Software
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-732869?
The severity of REDHAT-BUG-732869 is classified as moderate.
How do I fix REDHAT-BUG-732869?
To fix REDHAT-BUG-732869, you need to apply the recommended patches provided in the errata for your affected version of Linux CIFS.
What systems are affected by REDHAT-BUG-732869?
REDHAT-BUG-732869 affects systems running the Linux CIFS client.
What causes REDHAT-BUG-732869?
REDHAT-BUG-732869 is caused by a mismatch between signed and unsigned integer types in the handling of the resume_name_len variable.
Is there a workaround for REDHAT-BUG-732869?
A temporary workaround for REDHAT-BUG-732869 may involve limiting the size of data sent from the server.