Reference 1
Pointer to virtual function tables is frequently cast to general types such as char*, rendering the type match ineffective.
MLTA: a mechanism to precisely connect VTables to the corresponding classes and to keep track of class casting.
Similar work 2 3: a virtual function call can only invoke the virtual functions implemented in the current class or its derived class, but not others. Use an expanded single-layer type for finding targets.
MLTA outperforms them:
==> virtual functions of a derived class become valid icall targets of a base class only when an actual cast exists.
LLM: why only when an actual cast exists? Will it improve the precision? does it mean if function not called, then MLTA will not include into CFG but other will?
Goal: no more false negatives than FLTA (first-layer type analysis).
Chapter 8: Supporting MLTA in assembly or binary is out of the scope of this work.
Reference 1 Inter-procedural, semantic- and context-aware analysis. Modeling and cross-checking of the semantics of conditional statements in the peer slices of critical variables infer their criticalness. Use criticalness to detect missing-check bugs. 278 new missing-check bugs in Linux kernel that can cause security issues. 151 accepted by Linux maintainers. Missing Check Example /* Linux: net/smc/smc_ib.c */ static void smc_ib_remove_dev(struct ib_device *ibdev...) { struct smc_ib_device *smcibdev; /* ib_get_client_data may fail and return NULL */ smcibdev = ib_get_client_data(ibdev, &smc_ib_client); // ERROR1: NULL-pointer deference list_del_init(&smcibdev->list); /* ERROR2: device cannot be removed or unregistered */ smc_pnet_remove_by_ibdev(smcibdev); ib_unregister_event_handler(&smcibdev->event_handler); /* ERROR3: memory leak */ kfree(smcibdev); /* No return value: caller cannot know the errors */ } From NVD: 59.
Reference 1 Graph in GlobalContext: // file: // crix/analyzer/src/lib/Analyzer.h typedef DenseMap<Function*, CallInstSet> CallerMap; typedef DenseMap<CallInst *, FuncSet> CalleeMap; struct GlobalContext { // ... // Map a callsite to all potential callee functions. CalleeMap Callees; // Map a function to all potential caller instructions. CallerMap Callers; // ... } Github ↩
If you could revise
the fundmental principles of
computer system design
to improve security...
... what would you change?