[all-commits] [llvm/llvm-project] 8c87cf: [lldb][Mach-O] Bounds-check GetArchitectureAtIndex...
Yao Qi via All-commits
all-commits at lists.llvm.org
Wed Jun 24 14:42:00 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8c87cf1605d3cb9b0a24c728ac01c9637ae3dcac
https://github.com/llvm/llvm-project/commit/8c87cf1605d3cb9b0a24c728ac01c9637ae3dcac
Author: Yao Qi <qiyaoltc at gmail.com>
Date: 2026-06-24 (Wed, 24 Jun 2026)
Changed paths:
M lldb/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
M lldb/unittests/ObjectContainer/ObjectContainerUniversalMachOTest.cpp
Log Message:
-----------
[lldb][Mach-O] Bounds-check GetArchitectureAtIndex against m_fat_archs (#205289)
`ObjectContainerUniversalMachO::GetArchitectureAtIndex` used
`m_header.nfat_arch` (read directly from the file and untrusted, up to
0xFFFFFFFF) as the bound before indexing `m_fat_archs`. When ParseHeader
exhausts the data partway through and breaks early, `m_fat_archs.size()`
can be smaller than `nfat_arch`, so the indexed load is out of bounds.
Bound the check on the actual vector size instead.
Found by lldb-target-fuzzer.
---------
Co-authored-by: Alex Langford <nirvashtzero at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list