Commit 021840c
cifs: Fix struct FILE_ALL_INFO
struct FILE_ALL_INFO for level 263 (0x107) used by QPathInfo does not have
any IndexNumber, AccessFlags, IndexNumber1, CurrentByteOffset, Mode or
AlignmentRequirement members. So remove all of them.
Also adjust code in move_cifs_info_to_smb2() function which converts struct
FILE_ALL_INFO to struct smb2_file_all_info.
Fixed content of struct FILE_ALL_INFO was verified that is correct against:
* [MS-CIFS] section 2.2.8.3.10 SMB_QUERY_FILE_ALL_INFO
* Samba server implementation of trans2 query file/path for level 263
* Packet structure tests against Windows SMB servers
This change fixes CIFSSMBQFileInfo() and CIFSSMBQPathInfo() functions which
directly copy received FILE_ALL_INFO network buffers into kernel structures
of FILE_ALL_INFO type.
struct FILE_ALL_INFO is the response structure returned by the SMB server.
So the incorrect definition of this structure can lead to returning bogus
information in stat() call.
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent 071b8a6 commit 021840c
2 files changed
+7
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2203 | 2203 | | |
2204 | 2204 | | |
2205 | 2205 | | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
2211 | 2213 | | |
2212 | 2214 | | |
2213 | 2215 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2290 | 2290 | | |
2291 | 2291 | | |
2292 | 2292 | | |
2293 | | - | |
2294 | 2293 | | |
2295 | | - | |
2296 | | - | |
2297 | | - | |
2298 | | - | |
2299 | | - | |
2300 | 2294 | | |
2301 | 2295 | | |
2302 | 2296 | | |
| |||
0 commit comments