Module unsafe_ffi_tracker

Module unsafe_ffi_tracker 

Source
Expand description

Enhanced memory tracking for unsafe Rust and FFI operations

This module extends the basic memory tracking to handle:

  • Unsafe Rust memory operations (std::alloc::alloc, raw pointers)
  • FFI memory operations (malloc, free from C libraries)
  • Cross-boundary memory transfers
  • Safety violation detection

Structs§

AllocationMetadata
Metadata about memory allocations from LibC
AllocationOrigin
Information about where memory was originally allocated
BoundaryEvent
Cross-boundary memory event
BoundaryEventAnalysis
Comprehensive analysis of a boundary event
BoundaryEventStatistics
Statistics for boundary events
BoundaryRiskAssessment
Risk assessment for boundary transfers
BoundaryRiskFactor
Individual risk factor for boundary transfers
CFunctionInfo
Information about a specific C function
CLibraryInfo
C Library information for detailed tracking
ComplianceStatus
Compliance status
ComprehensiveSafetyReport
Comprehensive safety analysis report
EnhancedAllocationInfo
Enhanced allocation info with unsafe/FFI tracking
EnhancedLibCHookInfo
Enhanced LibC hook information with detailed tracking
ErrorPattern
Error pattern analysis
FunctionPerformanceMetrics
Performance metrics for C functions
HookInstallationDetails
Details about hook installation
LibCHookInfo
Information about LibC function hooks
LibraryMetadata
Library metadata
MemoryAccessPattern
Memory access pattern analysis
MemoryPassport
Memory “passport” for tracking cross-boundary transfers
MemoryProtectionFlags
Memory protection flags
OwnershipInfo
Current ownership information
OwnershipRecord
Record in the ownership chain
OwnershipTransferEvent
Ownership transfer event
PassportStamp
A stamp in the memory passport journey
PeakPeriod
Peak allocation period
PerformanceImpact
Performance impact analysis
RiskAssessment
Comprehensive risk assessment for unsafe operations
RiskFactor
Individual risk factor in an assessment
RuntimeBehaviorAnalysis
Runtime behavior analysis for hooked functions
SecurityAnalysis
Security analysis for hooked functions
SecurityImplication
Security implication of boundary crossing
SecurityVulnerability
Security vulnerability information
SizeDistribution
Size distribution analysis
StackFrame
Stack frame information for call stack tracking
TemporalPatterns
Temporal patterns in allocations
TransferMetadata
Metadata for cross-boundary transfers
UnsafeFFIStats
Statistics for unsafe and FFI operations
UnsafeFFITracker
Enhanced memory tracker for unsafe/FFI operations
UnsafeOperation
Represents a single unsafe operation

Enums§

AllocationSource
Enhanced allocation source tracking
BoundaryEventType
Types of boundary events
BoundaryRiskFactorType
Types of boundary risk factors
ErrorType
Types of errors that can be detected
HookInstallationMethod
Methods for installing hooks
HookMethod
Methods for hooking LibC functions
MemoryPatternType
Types of memory access patterns
OwnershipValidationStatus
Status of ownership validation
PerformanceImpactLevel
Levels of performance impact
RiskFactorType
Types of risk factors that can be detected
RiskLevel
Risk levels for safety violations
SafetyViolation
Safety violation types
SecurityClearance
Security clearance levels for memory operations
SecurityImplicationType
Types of security implications
UnsafeOperationType
Types of unsafe operations
ValidationMethod
Methods for validating cross-boundary transfers
ValidityStatus
Validity status of a memory passport
VulnerabilityType
Types of security vulnerabilities

Functions§

get_global_unsafe_ffi_tracker
Get the global unsafe/FFI tracker instance
get_global_unsafe_tracker
Get the global unsafe/FFI tracker instance
init_global_unsafe_tracker
Initialize the global unsafe/FFI tracker