Commit b2ff89c
committed
smb: client: validate dacloffset before building DACL pointers
jira VULN-188330
cve CVE-2026-46195
commit-author Michael Bommarito <michael.bommarito@gmail.com>
commit f98b481
parse_sec_desc(), build_sec_desc(), and the chown path in
id_mode_to_cifs_acl() all add the server-supplied dacloffset to pntsd
before proving a DACL header fits inside the returned security
descriptor.
On 32-bit builds a malicious server can return dacloffset near
U32_MAX, wrap the derived DACL pointer below end_of_acl, and then slip
past the later pointer-based bounds checks. build_sec_desc() and
id_mode_to_cifs_acl() can then dereference DACL fields from the wrapped
pointer in the chmod/chown rewrite paths.
Validate dacloffset numerically before building any DACL pointer and
reuse the same helper at the three DACL entry points.
Fixes: bc3e9dd ("cifs: Change SIDs in ACEs while transferring file ownership.")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4-6
Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
(cherry picked from commit f98b481)
Signed-off-by: Marcin Wcisło <marcin.wcislo@conclusive.pl>1 parent 3142a43 commit b2ff89c
1 file changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
1268 | 1279 | | |
1269 | 1280 | | |
1270 | 1281 | | |
| |||
1285 | 1296 | | |
1286 | 1297 | | |
1287 | 1298 | | |
1288 | | - | |
1289 | 1299 | | |
1290 | 1300 | | |
1291 | 1301 | | |
| |||
1316 | 1326 | | |
1317 | 1327 | | |
1318 | 1328 | | |
1319 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
1320 | 1336 | | |
1321 | 1337 | | |
1322 | | - | |
| 1338 | + | |
1323 | 1339 | | |
| 1340 | + | |
1324 | 1341 | | |
1325 | 1342 | | |
1326 | 1343 | | |
| |||
1343 | 1360 | | |
1344 | 1361 | | |
1345 | 1362 | | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
1346 | 1368 | | |
1347 | 1369 | | |
1348 | 1370 | | |
| |||
1718 | 1740 | | |
1719 | 1741 | | |
1720 | 1742 | | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
1721 | 1749 | | |
1722 | 1750 | | |
1723 | 1751 | | |
| |||
1760 | 1788 | | |
1761 | 1789 | | |
1762 | 1790 | | |
| 1791 | + | |
1763 | 1792 | | |
1764 | 1793 | | |
1765 | 1794 | | |
| |||
0 commit comments