[PATCH v3 0/6] fs/qnx6: fix buffer head leaks, double free, and inode validation
From: Hui Peng
Date: Thu Sep 24 2026 - 03:43:46 EST
This series addresses buffer head leaks, a double brelse(), and bounds-check
failures in the qnx6 filesystem driver:
1. Validate di_filelevels <= QNX6_PTR_MAX_LEVELS in qnx6_iget() before
accessing inode level pointers to prevent array bounds overflow.
2. Release bh via brelse() on error path in qnx6_block_map().
3. Avoid double brelse(sb_buf) on error path in qnx6_fill_super().
4. Release sb_buf on mmi_fs error path in qnx6_fill_super() when probing
MMI superblocks.
5. Abort mount on superblock magic mismatch when silent is set.
6. Validate sb_blocksize before dividing in qnx6_mmi_fill_super() to
prevent divide-by-zero.
Changes in v3:
- Add Tested-by and Reviewed-by tags from Matthias Goergens across all
patches in the series.
Changes in v2:
- Split into a 6-patch series as requested by maintainer review.
Hui Peng (6):
qnx6: validate di_filelevels in qnx6_iget() before accessing level pointers
qnx6: release bh on error path in qnx6_block_map()
qnx6: avoid double brelse() on error path in qnx6_fill_super()
qnx6: release sb_buf on mmi_fs error path in qnx6_fill_super()
qnx6: abort mount on superblock magic mismatch when silent is set
qnx6: validate sb_blocksize before dividing in qnx6_mmi_fill_super()
fs/qnx6/inode.c | 26 +++++++++++++++++++++-----
fs/qnx6/namei.c | 5 ++++-
2 files changed, 25 insertions(+), 6 deletions(-)