mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
In xchk_da_btree_block_check_sibling(), there is an if statement on
line 274 to check whether ds->state->altpath.blk[level].bp is NULL:
if (ds->state->altpath.blk[level].bp)
When ds->state->altpath.blk[level].bp is NULL, it is used on line 281:
xfs_trans_brelse(..., ds->state->altpath.blk[level].bp);
struct xfs_buf_log_item *bip = bp->b_log_item;
ASSERT(bp->b_transp == tp);
Thus, possible null-pointer dereferences may occur.
To fix these bugs, ds->state->altpath.blk[level].bp is checked before
being used.
These bugs are found by a static analysis tool STCheck written by us.
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
|
History
|
|
|---|---|---|
| .. | ||
| agheader.c | ||
| agheader_repair.c | ||
| alloc.c | ||
| attr.c | ||
| attr.h | ||
| bitmap.c | ||
| bitmap.h | ||
| bmap.c | ||
| btree.c | ||
| btree.h | ||
| common.c | ||
| common.h | ||
| dabtree.c | ||
| dabtree.h | ||
| dir.c | ||
| fscounters.c | ||
| health.c | ||
| health.h | ||
| ialloc.c | ||
| inode.c | ||
| parent.c | ||
| quota.c | ||
| refcount.c | ||
| repair.c | ||
| repair.h | ||
| rmap.c | ||
| rtbitmap.c | ||
| scrub.c | ||
| scrub.h | ||
| symlink.c | ||
| trace.c | ||
| trace.h | ||
| xfs_scrub.h | ||