Commit Graph

12 Commits

Author SHA1 Message Date
Kovid Goyal
950497ac0c Cleanup previous PR 2026-04-03 22:25:05 +05:30
z3rco
b39f88c6a2 Fix multiple security vulnerabilities across C, Python, and Go code
Timing-safe comparisons:
- crypto.c: Replace memcmp with CRYPTO_memcmp for Secret equality,
  require equal lengths before comparing
- remote_control.py: Constant-time password lookup to avoid leaking
  valid passwords via dict hash timing
- file_transmission.py: Use hmac.compare_digest for bypass token
  comparison instead of ==

Memory safety:
- child-monitor.c: Fix inverted condition in write_to_peer that
  prevented memmove from ever executing on partial writes
- ibus_glfw.c: Null-terminate IBUS_ADDRESS copy to prevent string
  overread when strlen >= PATH_MAX
- x11_window.c: Add NULL checks after realloc in clipboard/DnD
  data handling (two sites)
- dnd.c: Cap accepted_mimes at 1MB to prevent unbounded growth,
  fix realloc to not lose the original pointer on failure
- png-reader.c: Cast to size_t before multiplication to prevent
  integer overflow on 32-bit platforms

Secrets hygiene:
- disk-cache.c: Zero encryption_key with explicit_bzero before free

Tar extraction hardening:
- tar.go: Validate hardlink targets against destination prefix to
  prevent writing outside extraction directory
- tar.go: Strip setuid/setgid/sticky bits from extracted files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 16:10:46 +01:00
Kovid Goyal
796ee602de ... 2025-04-21 09:50:30 +05:30
Kovid Goyal
6f673929eb Fix failure of tarfile extract when dest_path has symlinks 2025-04-21 09:46:30 +05:30
Kovid Goyal
4d69eea4af Add test for tarfile extractall 2025-04-21 09:32:56 +05:30
Kovid Goyal
3daac6fb22 Remove unnecessary check 2025-04-20 23:38:16 +05:30
Kovid Goyal
50b830faa5 DRYer 2025-04-20 23:18:49 +05:30
Kovid Goyal
5a6c2d9f3b skip illegal paths in tar archives rather than erroring on them 2025-04-20 23:12:17 +05:30
Kovid Goyal
d7f4d44d8e More CodeQL fixes 2025-04-20 23:08:14 +05:30
Kovid Goyal
c84b894a89 Remove deprecated tar file type check 2025-04-20 15:59:20 +05:30
Kovid Goyal
8eb0b556b7 diff kitten: Fix a regression that broke diffing against remote files
Fixes #7797
2024-08-28 11:00:42 +05:30
Kovid Goyal
e4d936b5ed More work on porting the diff kitten 2023-03-27 07:53:54 +05:30