Name of the Vulnerable Software and Affected Versions:
Linux kernel versions prior to 6.6.61
Description:
The issue is related to a buffer overflow in the SMB2 IOCTL request handling. When using encryption, the client will squash all compound request buffers down for encryption into a single iov in `smb2 set next command()`. If the user passes an input buffer that is greater than 328 bytes, `smb2 set next command()` will end up writing off the end of `@rqst->iov[0].iov base`. This can be triggered by creating a symbolic link with a long name on a mounted CIFS share with the `seal` option.
Recommendations:
To resolve the issue, update the Linux kernel to version 6.6.61 or later. As a temporary workaround, consider avoiding the use of the `seal` mount option for CIFS shares until the update is applied. Additionally, restrict access to the vulnerable `smb2 set next command()` function and related API endpoints, such as `/mnt/link`, to minimize the risk of exploitation.