Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
setcred — CVE-2026-45250: FreeBSD 14.4 setcred kernel buffer overflow (LPE) | Kitploit
Tools/GitHubGitHub/venglin/setcred
Privilege EscalationExploit FrameworksVulnerability AnalysisExploitationShellcodePenetration TestingPayload DevelopmentBinary Exploitation
GitHubvenglin/setcred

setcred

CVE-2026-45250: FreeBSD 14.4 setcred kernel buffer overflow (LPE)

View Repository
222253 months agoReviewed by Kitploit
Share

FreeBSD setcred(2) — research artifacts

This subdirectory collects the write-up and working exploits for the setcred(2) stack buffer overflow in FreeBSD 14.x kernel.

The vulnerability itself is fully documented in setcred.txt. The short version: kern_setcred_copyin_supp_groups() uses sizeof(*groups) where groups is gid_t **, producing an 8-byte stride instead of 4 for a copyin() into a fixed-size kernel-stack array. The overflow is reachable before any privilege check, by any unprivileged user.

This repository captures two working exploit paths:

  • no-SMAP / no-SMEP — exp2_lpe_no_smap.c. A single setcred(2) syscall flips the calling thread to uid=0 by redirecting the chain primitive at amd64_syscall+0x155 to user-space shellcode through a fake struct sysentvec.

  • SMAP / SMEP enabled — exp_setcred_smap_zfs.c. Hijacks to ZSTD_initCStream_advanced in zfs.ko whose body writes td_ucred = rcx+1. With rcx = K1 = parent_pargs - 1 (a qword planted in a child's pargs slab), the calling thread's credential pointer lands inside the parent's pargs slab where we have planted a fake struct ucred with cr_uid=0. Works on any FreeBSD 14.4 GENERIC system with zfs.ko loaded (typical server configuration) and requires no kernel info-leak primitive.

Layout

setcred/
+- setcred.txt          Primary write-up: vulnerability, both LPE
|                       techniques, PoC pointers, FIX STATUS, timeline.
|                       Pure ASCII.
+- exploits/            Curated exploit drop.
    +- poc_dos.c                    Minimal DoS PoC -- any user
    |                               panics kernel.
    +- exp2_lpe_no_smap.c           Full LPE on no-SMAP/SMEP kernel.
    +- exp_setcred_smap_zfs.c       SMAP/SMEP-safe LPE via zfs.ko
    |                               ZSTD gadget.  No info-leak.
    +- wrapper.c                    Tiny setuid-root → /bin/sh
    |                               launcher installed at /tmp/rsh
    |                               by exp_setcred_smap_zfs.
    +- Makefile.setcred_smap_zfs    Guest-side build pipeline for
    |                               the SMAP/SMEP path
    |                               (all, install, clean).
    +- README_setcred_smap_zfs.md   End-user write-up for the
                                    SMAP/SMEP path.

Status

  • DoS (any user panics the kernel) and full LPE without SMAP/SMEP are reproducible by the corresponding programs in exploits/.

  • Full LPE with SMAP/SMEP enabled is reproducible via exp_setcred_smap_zfs.c on any FreeBSD 14.4 GENERIC system with zfs.ko loaded. See setcred.txt for the technique.

  • 14.4-RELEASE / stable/14 remain vulnerable as of report date. The fix landed in main on 2025-11-27 (commit 000d5b5) as a side effect of an unrelated refactoring and was not backported.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    755
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    510
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    415
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    343
  • 5

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    258

Explore all tools

Browse our collection of tools

View all tools →