Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

This is a version of KINT-based static analyzer used by DirtyCred paper modified to run on clang-13. I modified the code to extract the object's possible SLAB cache instead of what DirtyCred was doing.

License

Notifications You must be signed in to change notification settings

Albocoder/slab-cache-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Kernel Analyzer

This is a static kernel analyzer forked from KINT.

generate bitcode for Linux kernel

build LLVM with this patch, then build kernel with the compiled clang.

build the analyzer

set the LLVM_BUILD in the Makefile.inc to your local LLVM BUILD directory before running make.

run the analyzer

./analyzer `find your_bitcode_folder -name "*.c.bc"` 

Erin's note:

The code has been modified to output a csv list of struct_name,cache_name to indicate the cache where each struct is allocated. It doesn't work well for generic kmalloc calls but it works well with kmem_cache_alloc that use a global variable as their cache. For the kmalloc calls we simply use the max size of the object and indicate its potential kmalloc cache, which may notbe precise. This method can be fixed later to be more accurate by going down the use chain and find the hardcoded kmalloc caches.

run it with: ./analyzer `find <ROOT OF KERNEL SOURCE> -name "*.c.bc" ` --debug-verbose=0 2> struct_cache_res.txt

About

This is a version of KINT-based static analyzer used by DirtyCred paper modified to run on clang-13. I modified the code to extract the object's possible SLAB cache instead of what DirtyCred was doing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published