mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
cifs: Validate content of WSL reparse point buffers
WSL socket, fifo, char and block devices have empty reparse buffer. Validate the length of the reparse buffer. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
d3d797e326
commit
1f48660667
|
|
@ -719,6 +719,11 @@ int parse_reparse_point(struct reparse_data_buffer *buf,
|
|||
case IO_REPARSE_TAG_LX_FIFO:
|
||||
case IO_REPARSE_TAG_LX_CHR:
|
||||
case IO_REPARSE_TAG_LX_BLK:
|
||||
if (le16_to_cpu(buf->ReparseDataLength) != 0) {
|
||||
cifs_dbg(VFS, "srv returned malformed buffer for reparse point: 0x%08x\n",
|
||||
le32_to_cpu(buf->ReparseTag));
|
||||
return -EIO;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
cifs_tcon_dbg(VFS | ONCE, "unhandled reparse tag: 0x%08x\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user