block: partitions: bound sysv68 slice table count#951
Conversation
|
Upstream branch: 9716c08 |
c3a084b to
5f78e5d
Compare
|
Upstream branch: 2a2974b |
f4c6ba4 to
b1a450b
Compare
5f78e5d to
e48f9db
Compare
|
Upstream branch: 062871f |
b1a450b to
c0352d9
Compare
199644a to
e6d9eb8
Compare
|
Upstream branch: 66affa3 |
c0352d9 to
6b799ac
Compare
e6d9eb8 to
7d8604f
Compare
|
Upstream branch: bade58e |
6b799ac to
0629326
Compare
7d8604f to
4cc45a3
Compare
|
Upstream branch: 4edcdef |
0629326 to
976cbef
Compare
4cc45a3 to
90ffd56
Compare
sysv68_partition() reads a single sector for the slice table, but it trusts ios_slccnt from disk and walks that many entries after skipping the synthetic whole-disk slice. A crafted image can set ios_slccnt larger than the 64 struct slice records that fit in one sector and trigger an out-of-bounds read while scanning partitions. Limit the slice count to the number of records that fit in the sector returned by read_part_sector(), then drop the whole-disk entry only when the bounded count is non-zero. Fixes: 19d0e8c ("partition: add support for sysv68 partitions") Cc: stable@vger.kernel.org Reported-by: Yuan Tan <yuantan098@gmail.com> Reported-by: Zhengchuan Liang <zcliangcn@gmail.com> Reported-by: Xin Liu <bird@lzu.edu.cn> Assisted-by: Codex:GPT-5.4 Signed-off-by: Zhao Zhang <zzhan461@ucr.edu> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn> Reviewed-by: Philippe De Muyter <phdm@macqel.be>
|
Upstream branch: dc59e4f |
976cbef to
3ae236e
Compare
Pull request for series with
subject: block: partitions: bound sysv68 slice table count
version: 1
url: https://patchwork.kernel.org/project/linux-block/list/?series=1109453