Skip to content

Commit ec06a83

Browse files
committed
avoid infinite loop when exploit failed
1 parent 4f66028 commit ec06a83

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

Binary file not shown.

pocs/linux/kernelctf/CVE-2026-43074_lts/exploit/lts-6.12.82/modules/klog_reader.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,15 @@ std::optional<KernelRegisterSnapshot> KernelLogReader::read_oops_registers(
174174
fprintf(stderr, "[kernel log reader] delta buffer:\n%.*s\n", static_cast<int>(delta_log.size()),
175175
delta_log.data());
176176

177+
// if "list_add corruption" in the delta log, we fail, exit directly
178+
if (delta_log.find("list_add corruption") != std::string_view::npos) {
179+
fprintf(stderr,
180+
"[kernel log reader] detected 'list_add corruption' in kernel log, which "
181+
"indicates the exploit is likely in a bad state,"
182+
"exiting to avoid infinite loop\n");
183+
exit(1);
184+
}
185+
177186
std::optional<KernelRegisterSnapshot> snapshot;
178187
if (!delta_log.empty()) {
179188
OopsLogParser parser(required);

0 commit comments

Comments
 (0)