Skip to content

v1.3.2-unified

Choose a tag to compare

@Tianshang301 Tianshang301 released this 27 Jun 21:43
· 89 commits to main since this release

TianshangGuard v1.3.2 (Unified / 统一版)

Release Date / 发布日期: 2026-06-28
Package / 包名: com.tianshang.guard
Language / 语言: Auto-detect Chinese & English / 自动检测中英文
Version / 版本号: versionCode=8, versionName=1.3.2-unified


English

Security Audit Fixes (38 vulnerabilities across 2 rounds)

Round 1: 18 vulnerabilities

Critical (4)

  • SQL injection: EncryptedDatabaseProvider path and passphrase sanitization
  • Buffer overflow: DnsPacketHandler IP checksum bounds check
  • Response truncation: GuardVpnService use remaining() instead of limit()
  • UTF-8 truncation: ByteTokenizer multi-byte character safe truncation

High (6)

  • Race condition: Bm25Engine feedback index synchronization
  • Thread safety: OnnxMlEngine use ConcurrentHashMap
  • Resource leak: DohClient response body properly closed
  • Memory leak: LocalDnsEngine coroutine scope cancellation
  • Whitelist bypass: HomographDetector homograph detection
  • Keepalive encoding: GuardVpnService DNS label encoding

Medium (8)

  • Visibility, IP regex, signature bypass, duplicate key, integer overflow, threshold protection, log sanitization

Round 2: 20 vulnerabilities

Critical (2)

  • VPN restart cancellation: restartRunnable cancellable on stopVpn()
  • ONNX session leak: close old OrtSession on model reload

High (7)

  • File stream leak: handlePackets() finally block closes streams
  • @volatile: LocalDnsEngine shared field visibility
  • BK-tree race: double-checked locking
  • Rate limiter race: canLaunchAlert() synchronized
  • pendingRunnables leak: consume() cleanup
  • State race: MlEngineWithFallback.getState() synchronized
  • Certificate pinning: Cloudflare DoH endpoint pins

Medium (6)

  • TTL expiry, BootReceiver DI, SQL sanitization, certificate pinning, clearFeedbackIndex sync

Low (5)

  • Integer overflow, regex reuse, clear() fix

中文

安全审计修复(两轮共 38 个漏洞)

第一轮:18 个漏洞

Critical (4)

  • SQL 注入:EncryptedDatabaseProvider 路径和密码清理
  • 缓冲区溢出:DnsPacketHandler IP 校验和边界检查
  • 响应截断:GuardVpnService 使用 remaining() 替代 limit()
  • UTF-8 截断:ByteTokenizer 多字节字符安全截断

High (6)

  • 竞态条件:Bm25Engine 反馈索引同步
  • 线程安全:OnnxMlEngine 使用 ConcurrentHashMap
  • 资源泄漏:DohClient 响应体正确关闭
  • 内存泄漏:LocalDnsEngine 协程作用域取消
  • 白名单绕过:HomographDetector 同形字符检测
  • Keepalive 编码:GuardVpnService DNS 标签编码

Medium (8)

  • 可见性、IP 正则、签名绕过、重复 key、整数溢出、阈值保护、日志脱敏

第二轮:20 个漏洞

Critical (2)

  • VPN 重启取消:restartRunnable 可在 stopVpn() 时取消
  • ONNX 会话泄漏:模型重载时关闭旧 OrtSession

High (7)

  • 文件流关闭:handlePackets() finally 块关闭流
  • @volatile:LocalDnsEngine 共享字段可见性
  • BK-tree 竞态:双重检查锁定
  • 限流器竞态:canLaunchAlert() 同步
  • pendingRunnables 泄漏:consume() 清理
  • 状态竞态:MlEngineWithFallback.getState() 同步
  • 证书固定:Cloudflare DoH 端点固定

Medium (6)

  • TTL 过期、BootReceiver DI、SQL 清理、证书固定、clearFeedbackIndex 同步

Low (5)

  • 整数溢出、正则复用、clear() 修复

Build Info / 构建信息

  • Build / 构建: SUCCESS
  • Real device test / 真机测试: PASS
  • Memory / 内存: ~88 MB PSS

Download / 下载

  • TianshangGuard-v1.3.2-unified.apk — Auto-detect language / 自动检测语言
    • Supports Chinese & English SMS phishing detection / 支持中英文短信钓鱼检测
    • URL phishing detection / URL 钓鱼检测
    • DNS protection / DNS 防护