Update CVE 2021 15551 - #123
Open
TheVeryDarkness wants to merge 14 commits into
Open
Conversation
TheVeryDarkness
force-pushed
the
update-CVE-2021-15551
branch
from
August 25, 2026 01:42
12daf09 to
a8c9495
Compare
- Added support for new predicates: `lifetime_bypass`, `strong_bypass`, `weak_bypass`, `unresolvable_generic`, `generic_drop`, `cfg_reaches`, `bypass_on_copy`, and `set_len_to_zero`, improving the expressiveness of dataflow constraints. - Implemented evaluation functions for the new predicates in `PredicateEvaluator`, allowing for more comprehensive analysis of unsafe dataflow scenarios. - Updated the `mentions_cfg_reaches` method in `Constraints` to facilitate the handling of CFG reachability in pattern matching. - Enhanced documentation for dataflow predicates, including usage examples and clarifications on their implications in the context of panic safety and CVE handling. - Added tests to validate the new predicates and ensure correct behavior in various scenarios.
…weak safety levels - Renamed diagnostic names from `panic_safety` to `panic_safety_strong` and `panic_safety_weak` to improve clarity in error reporting. - Updated related test outputs to reflect the new diagnostic names, ensuring consistency across panic safety checks.
- Renamed diagnostic name from `unchecked_pointer_offset` to `unchecked_pointer_offset_general` to enhance clarity in error reporting. - Updated related test outputs to reflect the new diagnostic name, ensuring consistency across pointer safety checks. - Added new test files for CVE-2018-20991 and CVE-2018-20995 to validate the changes.
TheVeryDarkness
force-pushed
the
update-CVE-2021-15551
branch
from
September 7, 2026 07:48
667fa3d to
2459a40
Compare
- Introduced a new panic safety pattern in `panic-safety.rpl` to enhance handling of unsafe dataflow scenarios. - Updated `patterns.rs` to include the new Rudra pattern. - Modified existing test files to reflect changes in diagnostics and ensure proper validation of panic safety checks. - Adjusted `.stderr` files to align with the new diagnostic outputs for CVE tests, ensuring consistency across error reporting.
- Introduced new RPL patterns for `session-adt-def-unify`, `session-optional-fn-underscore`, `session-required-adt-missing`, `session-shared-ty-hit`, `session-shared-ty-mismatch-sig`, and `session-sig-not-arity` to enhance ADT matching capabilities. - Created corresponding Rust test files to validate the new patterns, ensuring correct diagnostics and behavior in various scenarios. - Removed obsolete `.stderr` files related to previous tests to streamline the test suite. - Updated existing tests to align with the new pattern definitions and improve overall test coverage for session management.
- Updated `match_adt_for_fn_mir` and `match_adt_structure` methods to accept generic arguments, improving the handling of ADT matches. - Introduced `collect_adt_def_bindings` to project `AdtPat` to `AdtDef`, ensuring proper binding in shared environments. - Modified related functions to accommodate the new argument structure and updated tests to validate these changes. - Enhanced `BindingSnapshot` and `MetaBindings` to include `adt_defs`, allowing for better tracking of ADT definitions across match sessions. - Improved diagnostics and error handling in session matching to address potential ambiguities in ADT bindings.
- Updated `match_adt_for_fn_mir` and `match_adt_structure` to accept `GenericArgsRef`, improving ADT matching capabilities. - Introduced `bind_adtpat_substs` to bind type variables from ADT patterns to generic arguments, enhancing type variable handling. - Modified `match_ty` to accommodate the new argument structure, ensuring accurate type matching across patterns. - Enhanced `collect_sig_candidates` to utilize the updated function context, improving candidate collection for function signatures. - Updated tests to validate the new functionality and ensure correct diagnostics in various matching scenarios.
- Removed unused `fn_candidate_cache` from `CheckFnCtxt` and `MatchCollectCtxt`, simplifying the context structure. - Introduced new methods in `MatchTyCtxt` for pinning type and constant variables, improving the management of variable states during matching. - Updated `matches` and `check` functions to utilize the new pinning logic, enhancing the accuracy of type variable matching. - Refactored `collect_fn_candidates` to streamline candidate collection and improve performance. - Enhanced diagnostics and error handling in the matching process to address potential ambiguities in type variable bindings.
- Refactored `check_constraints` and related methods in `MatchCollectCtxt` to incorporate environment bindings and enhance constraint evaluation. - Introduced `check_impl_constraints` to validate constraints for implementation methods, ensuring accurate matching across different contexts. - Updated `SessionMatching` to handle function slots more effectively, including checks for implementation method domains. - Enhanced diagnostics for unbound meta variables and improved handling of type and constant variable bindings in matching scenarios. - Added new tests to validate the updated functionality and ensure correct behavior in various matching contexts.
…ted matches - Introduced `SessionOutcome` struct to encapsulate results and truncation status in session matching. - Updated `MatchSession` and `SessionMatching` to utilize `SessionOutcome`, enhancing clarity in match results. - Added diagnostics for truncated matches, warning users when results exceed the configured maximum. - Enhanced `SessionConfig` with a method to check if the result count has reached the maximum limit. - Updated tests and documentation to reflect changes in session handling and diagnostics.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.