Skip to content

Add support for declaring implementation-specific abstract operations#115

Draft
jellllly420 wants to merge 4 commits intoRPL-Toolchain:masterfrom
jellllly420:doc/cve
Draft

Add support for declaring implementation-specific abstract operations#115
jellllly420 wants to merge 4 commits intoRPL-Toolchain:masterfrom
jellllly420:doc/cve

Conversation

@jellllly420
Copy link
Copy Markdown
Contributor

Still in progress!!! Opened this for CI.

jellllly420 and others added 4 commits March 31, 2026 01:21
Allow users to declare named sets of concrete function paths
in rpl.toml under [operations], e.g. lock = ["std::sync::Mutex::lock", ...].
These will be used to support abstract operations in RPL patterns.

Co-authored-by: Claude <noreply@anthropic.com>
Implement expand_operations() in rpl_meta::expand that scans .rpl
source text for @Identifier tokens, looks them up in an operations
table, and produces expanded variants via cartesian product replacement.
Includes 6 unit tests covering: no-ops passthrough, single/multi op
expansion, cartesian product, undefined ops, and empty op lists.

Co-authored-by: Claude <noreply@anthropic.com>
Thread operations table from rpl.toml config through RPL_OPS env var
to the rustc driver, and call expand_all_patterns() in callbacks
before the pest parser sees the pattern sources. Undefined @op
references emit a warning and skip the pattern gracefully.

Co-authored-by: Claude <noreply@anthropic.com>
Detects raw pointer dereferences (intrusive linked list traversal)
without a preceding lock acquisition, the structural pattern behind
the first CVE in Linux kernel Rust code (rust_binder race condition).

Uses the difference operator to express "without": matches pointer
dereference but subtracts variants where a lock call precedes it.

Co-authored-by: Claude <noreply@anthropic.com>
@jellllly420
Copy link
Copy Markdown
Contributor Author

@claude review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant