Exploit databaseDownload repository ZIP
GH-3e4507aa2dfab678631e56a68e29c690
gouldnicholas/cve-2026-7669-poc
Sources for CVE-2026-7669
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files25
gouldnicholas/cve-2026-7669-pocRevision 1cb1dd334443
- ↑..Parent directory
- cpp_radix_tree/
- hybrid_cache/
- sparsity/
- storage/
- allocator.py
- base_prefix_cache.py
- cache_init_params.py
- chunk_cache.py
- common.py
- evict_policy.py
- flush_cache.py
- hi_mamba_radix_cache.py
- hicache_storage.py
- hiradix_cache.py
- hisparse_memory_pool.py
- mamba_radix_cache.py
- memory_pool.py
- memory_pool_host.py
- multimodal_cache.py
- radix_cache.py
- radix_cache_cpp.py
- session_aware_cache.py
- swa_memory_pool.py
- swa_radix_cache.py
- utils.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
sglang_source/python/sglang/srt/mem_cache/evict_policy.py
Python · 2,128 bytesfrom __future__ import annotations
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Tuple, Union
if TYPE_CHECKING:
from sglang.srt.mem_cache.radix_cache import TreeNode
class EvictionStrategy(ABC):
@abstractmethod
def get_priority(self, node: "TreeNode") -> Union[float, Tuple]:
pass
class LRUStrategy(EvictionStrategy):
def get_priority(self, node: "TreeNode") -> float:
return node.last_access_time
class LFUStrategy(EvictionStrategy):
def get_priority(self, node: "TreeNode") -> Tuple[int, float]:
return (node.hit_count, node.last_access_time)
class FIFOStrategy(EvictionStrategy):
def get_priority(self, node: "TreeNode") -> float:
return node.creation_time
class MRUStrategy(EvictionStrategy):
def get_priority(self, node: "TreeNode") -> float:
return -node.last_access_time
class FILOStrategy(EvictionStrategy):
def get_priority(self, node: "TreeNode") -> float:
return -node.creation_time
class PriorityStrategy(EvictionStrategy):
"""Priority-aware eviction: lower priority values evicted first, then LRU within same priority."""
def get_priority(self, node: "TreeNode") -> Tuple[int, float]:
# Return (priority, last_access_time) so lower priority nodes are evicted first
return (node.priority, node.last_access_time)
class SLRUStrategy(EvictionStrategy):
def __init__(self, protected_threshold: int = 2):
self.protected_threshold = protected_threshold
def get_priority(self, node: "TreeNode") -> Tuple[int, float]:
# Priority Logic:
# Smaller value = Evicted earlier.
#
# Segment 0 (Probationary): hit_count < threshold
# Segment 1 (Protected): hit_count >= threshold
#
# Tuple comparison: (segment, last_access_time)
# Nodes in segment 0 will always be evicted before segment 1.
# Inside the same segment, older nodes (smaller time) are evicted first.
is_protected = 1 if node.hit_count >= self.protected_threshold else 0
return (is_protected, node.last_access_time)