@@ -252,8 +252,14 @@ def read_debugsources(file_path):
# We need to remove one level from the debug sources
for source_list in json_data.values():
for source in source_list:
+ # entries are empty if the kernel has no debug info
+ if "/" not in source:
+ continue
src = source.split("/",1)[1]
cfiles.add(src)
+ if not cfiles:
+ sys.exit(f"{file_path} lists no compiled sources: "
+ "is the kernel built without debug info (CONFIG_DEBUG_INFO)?")
return cfiles
def check_kernel_compiled_files(compiled_files, cve_info):
A kernel built without debug info (CONFIG_DEBUG_INFO_NONE) has only empty entries in its debugsources file, and the script fails with an IndexError. Skipping them is not enough: with no compiled files left, every CVE would be ignored as not applicable. Skip entries without a path and stop with a clear message if nothing is left. Found with linux-fslc for imx6qdlsabresd. AI-Generated: Uses Claude Signed-off-by: Prasanth R <prasanth.r@lineo.co.jp> --- scripts/contrib/improve_kernel_cve_report.py | 6 ++++++ 1 file changed, 6 insertions(+)