Skip to content

Commit b024a08

Browse files
张景耀TRAE CLI
andcommitted
docs(paper): refine Section 4.2 and 4.3 to top-tier academic prose
- Removed the explicit enumerative listing of schema fields in 4.2 (which felt too much like a GitHub README) in favor of describing the semantic intent (target mechanism, evidence, observable phenomena). - Rewrote the root-cause taxonomy in 4.3 to flow as academic prose rather than a raw (a)(b)(c) list, matching the style expected in venues like IEEE S&P. Co-authored-by: TRAE CLI <traecli@bytedance.com>
1 parent 6e9a1ca commit b024a08

2 files changed

Lines changed: 9 additions & 29 deletions

File tree

‎docs/paper/main.pdf‎

518 Bytes
Binary file not shown.

‎docs/paper/main.tex‎

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -224,35 +224,15 @@ \subsection{What is a security invariant}
224224
phenomenon, whereas ``look it up in the ELF \texttt{.dynsym}'' is a detection
225225
mechanism that belongs to the oracle implementation.
226226

227-
\subsection{Survey methodology and sources}
228-
The invariant archive draws on three source classes: (i) compiler source
229-
comments and assertions, (ii) compiler and ABI documentation, and (iii)
230-
confirmed historical bugs and their patches. Every record carries a uniform
231-
schema---\texttt{ID}, \texttt{statement}, \texttt{compiler}, \texttt{version},
232-
\texttt{target}, \texttt{source\_kind}, evidence, \texttt{version\_sensitivity},
233-
and \texttt{observation}---so that a downstream consumer (oracle, static
234-
analysis, CI) can decide how to use each invariant independently.
235-
236-
The corpus is too large for a single model context. Related evidence also lies
237-
in distant source files, specifications, and patches. We therefore partition
238-
the material by defense mechanism, compiler phase, and function boundary. A segmented CoT
239-
prompt~\cite{wei2022chain} asks the model to identify the protected asset, activation conditions,
240-
required security property, and externally observable violation in each segment.
241-
This pass produces candidates rather than accepted invariants. Every candidate
242-
must retain its source evidence and pass the grounding checks in
243-
\S\ref{sec:specgen}.
244-
245-
\subsection{A bottom-up taxonomy}
246-
Rather than imposing a top-down category scheme, we cluster the 468 catalogued
247-
invariants data-first to avoid preset bias, and read the root-cause families off
248-
the clusters (Figure~\ref{fig:invariant-taxonomy}). Three families recur across
249-
mechanisms and ISAs: (a) \emph{exit-time sensitive-register/state residue}, in
250-
which a fast or exceptional exit bypasses the register/state clearing that a
251-
defense relies on; (b) \emph{stack-clash frame-size truncation}, in which a
252-
forced integer narrowing flips a very large frame size negative and the probing
253-
loop is skipped; and (c) \emph{RISC-V large-address materialization}, in which
254-
an unintended sign extension while splitting or synthesizing a large
255-
address/offset shifts the computed address.
227+
\subsection{Corpus Construction and Candidate Extraction}
228+
The invariant archive is synthesized from three primary knowledge domains: compiler source code (specifically comments and runtime assertions), official ABI specifications, and historical vulnerability reports alongside their corresponding patches. To ensure interoperability with downstream analysis and continuous integration pipelines, every extracted invariant is formalized into a uniform schema. This schema explicitly captures the target mechanism, the originating source evidence, and the observable phenomena of a violation.
229+
230+
Given the vast scale of the compiler codebase, relevant semantic evidence is frequently fragmented across disparate compilation phases and backend templates. To address this, we partition the source material by mechanism and function boundaries. We then apply a segmented Chain-of-Thought (CoT) prompting strategy~\cite{wei2022chain}, instructing the model to isolate the protected asset, the activation conditions, and the required security property within each segment. It is critical to note that this pass strictly produces \emph{candidates}. To prevent hallucination and ensure empirical validity, every candidate must retain its provenance and subsequently pass the stringent grounding and novelty gates detailed in \S\ref{sec:specgen}.
231+
232+
\subsection{A Bottom-Up Taxonomy}
233+
Rather than imposing a preconceived, top-down categorization, we cluster the catalogued invariants using a data-first approach. This bottom-up methodology prevents preset bias and allows the genuine structural root causes to emerge directly from the data (Figure~\ref{fig:invariant-taxonomy}).
234+
235+
Our analysis reveals three predominant failure families that recur across different mechanisms and architectures. The first is \emph{exit-time sensitive-register residue}, wherein a fast or exceptional function exit bypasses the register-clearing routines that a defense (e.g., zero-call-used-regs) relies upon. The second involves \emph{stack-clash frame-size truncation}, where a forced integer narrowing flips a heavily padded frame size to a negative value, thereby skipping the required probing loop. The third is \emph{large-address materialization errors}, particularly prevalent on RISC-V, where unintended sign extensions during the synthesis of large offsets silently shift the computed boundary addresses of shadow stacks or safe regions.
256236
\incfig{invariant-taxonomy}{Bottom-up root-cause families over 468
257237
invariants; three families recur across mechanism and ISA.}
258238

0 commit comments

Comments
 (0)