Bug 199423
Summary: | Invalid pointer dereference in xfs_bmapi_write() when mounting and operating a crafted xfs image | ||
---|---|---|---|
Product: | File System | Reporter: | Wen Xu (wen.xu) |
Component: | XFS | Assignee: | Eric Sandeen (sandeen) |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | sandeen, wen.xu |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.16, 4.17 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
The (compressed) crafted image which causes crash
poc.c Kernel config |
Description
Wen Xu
2018-04-17 02:00:50 UTC
Created attachment 275421 [details]
poc.c
Created attachment 275423 [details]
Kernel config
[PATCH] xfs: set format back to extents if xfs_bmap_extents_to_btree fails If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. |