Skip to content

Latest commit

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Linux Kernel Security Patches — CVEs 2026

Overview

Security patches, hardening configurations, and pre-built custom kernel for Linux. Focused on critical vulnerabilities discovered in 2025-2026. Compatible with Debian-based distributions (ParrotOS, Kali, Ubuntu).


🛡️ Custom Hardened Kernel 6.19.13

Pre-built, hardened Linux kernel with 27+ security mitigations enabled, Dirty Frag LPE patched, and 20+ CVE mitigations applied.

Download (Pre-built .deb)

PackageSizeDownload
linux-image292 MBReleases
linux-headers11 MBReleases
linux-image-dbg1.3 GBReleases

Install

sudo dpkg -i linux-image-6.19.13-parrot.custom+2.0-cachyos-g372c9ba96bd4-dirty_6.19.13-g372c9ba96bd4-8_amd64.deb \
linux-headers-6.19.13-parrot.custom+2.0-cachyos-g372c9ba96bd4-dirty_6.19.13-g372c9ba96bd4-8_amd64.deb
sudo update-grub
sudo reboot

Hardening Applied

CategoryOptions
Memory SafetyINIT_ON_FREE_DEFAULT_ON, ZERO_CALL_USED_REGS, SHUFFLE_PAGE_ALLOCATOR, SLAB_FREELIST_HARDENED, RANDSTRUCT_PERFORMANCE
Module SecurityMODULE_SIG_FORCE, MODULE_SIG_ALL, MODULE_SIG_SHA512
Kernel LockdownLOCK_DOWN_KERNEL_FORCE_INTEGRITY
CPU MitigationsSLS, RETBLEED, SRSO, GDS, RFDS, Spectre BHI, MMIO Stale Data
SchedulerBORE + CachyOS optimizations
Access ControlSECURITY_DMESG_RESTRICT, STRICT_DEVMEM, IO_STRICT_DEVMEM
Attack SurfaceNET_SCH_QFQ disabled (CVE-2026-22976), INET_DIAG_DESTROY disabled

CVEs Patched / Mitigated

CVECVSSTypeMitigation
Dirty Frag (no CVE)~9.0LPE via xfrm-ESP + RxRPC page-cache writeModule blacklist + kernel patch (SKBFL_SHARED_FRAG)
CVE-2026-229765.5NULL deref in sch_qfqModule disabled (NET_SCH_QFQ=n)
CVE-2025-379167.8UAF in pds_coreModule build (depends on hardware)
CVE-2025-381797.8OOB in cifsCIFS_SMB_DIRECT not set
CVE-2026-231717.8UAF in bondingModule build
CVE-2026-231987.8UAF in KVMModule build
CVE-2026-233367.8UAF in cfg80211Module build
CVE-2026-314947.8OOB in macbModule build
CVE-2026-314317.8Copy Fail LPE✅ Patched
CVE-2026-315899.8UAF in folio_unmap✅ Patched
CVE-2026-316499.8Integer underflow stmmac✅ Patched
CVE-2026-315337.8UAF in TLS✅ Patched
CVE-2026-314085.5UAF in Bluetooth SCO✅ Patched

Full CVE tracking: kernel-6.19-custom/CVE-TRACKING.md

Build from Source

# Get kernel source
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.19.tar.xz
tar xf linux-6.19.tar.xz
cd linux-6.19
# Apply our hardened config
cp configs/defconfig .config
make olddefconfig
# Apply NVIDIA compat patch (if using NVIDIA proprietary driver)
patch -p1 < ../nvidia-compat-mutex_destroy.patch
# Build
make -j$(nproc)
sudo make modules_install
sudo make install
sudo update-grub

Hardening Comparison

How our custom kernel compares against major distro kernels:

Hardening OptionOur Kernel 6.19Solus LTS 6.18Debian 6.12
CPU Mitigations (24)✅ All✅ All✅ All
Struct Randomization✅ PERFORMANCE❌ NONE❌ NONE
Module Signing (Force)✅ SHA-512
Kernel Lockdown✅ INTEGRITY
INIT_ON_FREE✅ Zero on kfree
ZERO_CALL_USED_REGS
DMESG_RESTRICT
IO_STRICT_DEVMEM
Dirty Frag LPE✅ Patched❌ Vulnerable❌ Vulnerable

Solus comparison based on PR #8790 (linux-lts 6.18.28).

Kernel Config


🔧 CVE Patches

Patch Files

FileCVESeverityDescription
CVE-2026-31431-copy-fail.patchCVE-2026-31431HIGH (7.8)Copy Fail - Local Privilege Escalation via page cache
CVE-2026-31589-folio-unmap-uaf.patchCVE-2026-31589CRITICAL (9.8)Use-after-free in folio_unmap_invalidate
CVE-2026-31649-stmmac-integer-underflow.patchCVE-2026-31649CRITICAL (9.8)Integer underflow in stmmac Ethernet driver
CVE-2026-31533-tls-uaf.patchCVE-2026-31533HIGH (7.8)Use-after-free in TLS subsystem
CVE-2026-31408-bluetooth-sco-uaf.patchCVE-2026-31408MEDIUM (5.5)Use-after-free in Bluetooth SCO
nvidia-compat-mutex_destroy.patchN/A (compat)Export mutex_destroy as non-GPL for NVIDIA DKMS

Apply Patches

git clone https://github.com/MethodWhite/kernel-security-patches.git
cd kernel-security-patches
# Download kernel source
apt-get source linux-image-$(uname -r)# Apply patches
chmod +x apply-kernel-fixes.sh
./apply-kernel-fixes.sh /path/to/kernel/source
# Build and installcd /path/to/kernel/source
make -j$(nproc)
sudo make modules_install
sudo make install
sudo update-grub
sudo reboot

🛡️ System Hardening

chmod +x apply-fixes-immediate.sh
sudo ./apply-fixes-immediate.sh

Hardening applied:

  • Disable ICMP echo (stealth mode)
  • SSH hardening (key-based auth, no root login)
  • Service lockdown (disable unused remote services)
  • Network hardening (disable source routing, redirects)
  • Kernel sysctl security (kptr_restrict, dmesg_restrict, bpf disabled)

Security Verification

uname -r # Should show 6.19.13+
cat /etc/modprobe.d/dirtyfrag.conf # Dirty Frag blocked
sysctl kernel.unprivileged_bpf_disabled # = 1
sysctl kernel.kptr_restrict # = 2
sysctl kernel.dmesg_restrict # = 1

Files Structure

├── configs/
│ ├── defconfig # Kernel boot config (hardened)
│ ├── defconfig-full # Full kernel config
│ └── dirtyfrag.conf # Dirty Frag module blacklist
├── kernel-6.19-custom/
│ ├── CVE-TRACKING.md # Complete CVE audit for custom kernel
│ └── CHANGELOG.md # Build changelog
├── CVE-2026-31431-copy-fail.patch
├── CVE-2026-31589-folio-unmap-uaf.patch
├── CVE-2026-31649-stmmac-integer-underflow.patch
├── CVE-2026-31533-tls-uaf.patch
├── CVE-2026-31408-bluetooth-sco-uaf.patch
├── nvidia-compat-mutex_destroy.patch # NVIDIA DKMS compat (EXPORT_SYMBOL)
├── apply-kernel-fixes.sh # Kernel patch applicator
├── apply-fixes-immediate.sh # System hardening
├── apply-security-patches.sh # Security-only patcher
├── apply-system-hardening.sh # Full system hardening
├── system-security-analyzer.sh # Security analysis tool
├── INFORME_ANALISIS_SISTEMA.md # System analysis (ES)
├── INFORME_COMPLETO_VULNERABILIDADES.md # Vulnerability report (ES)
└── README.md

References

License

MIT License — Free to use, modify, and distribute.

Disclaimer

Patches provided as-is. Always backup before applying kernel updates. Test in a VM/sandbox before deploying to production.


Last Updated: 2026-05-12 — Kernel: 6.19.13.parrot.custom+2.0-cachyos (hardened) · 6.12.x (patch series)

About

Linux Kernel Security Patches & Analysis - CVEs 2026 - Includes custom kernel for NVIDIA CUDA support

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages