Exploit database

GH-46dd0b2c14bcd94783555ca204d82fc3

wjnkac/cve-2026-43499-oppo-a5-pbbt30

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files16
wjnkac/cve-2026-43499-oppo-a5-pbbt30Revision 8d92fcd5b02e

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

main/src/setns_probe.c

C · 1,483 bytes
/* setns_probe.c — 判别 app 域 setns EPERM 的来源(seccomp vs 内核能力检查)
 * 在 root+caps 上下文跑(01 -- setns_probe):
 *   self-setns=0 且 init-setns=EPERM ⇒ 内核侧问题(同 cap 检查下不可能)
 *   self-setns=EPERM                  ⇒ seccomp 按 syscall 拦(mount 能过、setns 不能过)
 *   unshare(0)=EINVAL ⇒ 放行;=EPERM ⇒ 被拦(errno 式过滤)
 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/syscall.h>

static void try_setns(const char *path)
{
    int fd = open(path, O_RDONLY);
    if (fd < 0) { printf("  open(%s) FAIL errno=%d(%s)\n", path, errno, strerror(errno)); return; }
    errno = 0;
    long r = syscall(__NR_setns, fd, 0);
    printf("  setns(%s) = %ld errno=%d (%s)\n", path, r, errno, strerror(errno));
    close(fd);
}

int main(void)
{
    printf("== setns(self mnt ns)(无操作自指;内核侧有 caps 应返回 0)==\n");
    try_setns("/proc/self/ns/mnt");
    printf("== setns(init mnt ns)(全局挂载的目标)==\n");
    try_setns("/proc/1/ns/mnt");
    printf("== unshare(0)(内核应 EINVAL;EPERM=被 seccomp 拦)==\n");
    errno = 0;
    long r = syscall(__NR_unshare, 0);
    printf("  unshare(0) = %ld errno=%d (%s)\n", r, errno, strerror(errno));
    printf("== setns(self net ns)(换个 ns 类型交叉验证)==\n");
    try_setns("/proc/self/ns/net");
    return 0;
}