Package Details: mimic-bpf-dkms-git 0.7.1.r6.5df4c27-1

Git Clone URL: https://aur.archlinux.org/mimic-bpf-git.git (read-only, click to copy)
Package Base: mimic-bpf-git
Description: eBPF UDP -> TCP obfuscator - DKMS module
Upstream URL: https://github.com/hack3ric/mimic
Licenses: GPL-2.0-only
Conflicts: mimic-bpf-dkms, mimic-bpf-modules
Provides: mimic-bpf-dkms, mimic-bpf-modules
Submitter: hack3ric
Maintainer: hack3ric
Last Packager: hack3ric
Votes: 0
Popularity: 0.000000
First Submitted: 2024-03-16 06:38 (UTC)
Last Updated: 2026-06-13 18:06 (UTC)

Dependencies (8)

Required by (2)

Sources (1)

Latest Comments

hack3ric commented on 2026-06-13 18:07 (UTC)

@flylightning thanks, both mimic-bpf and mimic-bpf-git fixed with your patch

flylightning commented on 2026-06-12 12:02 (UTC) (edited on 2026-06-12 15:50 (UTC) by flylightning)

The file install/mimic.sysusers has been removed in https://github.com/hack3ric/mimic/commit/5df4c27eb72358c144272f7cd9e1693d3f590b5b, so install -Dm644 "$srcdir/$_pkgname/install/$_pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf" in https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mimic-bpf-git#n47 will fail and the package won't build. Please consider remove this line. Here's the diff patch:

diff --git a/.SRCINFO b/.SRCINFO
index bbbb85b..38cb854 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
 pkgbase = mimic-bpf-git
    pkgdesc = eBPF UDP -> TCP obfuscator
-   pkgver = 0.7.1.r2.59950b3
+   pkgver = 0.7.1.r6.5df4c27
    pkgrel = 1
    url = https://github.com/hack3ric/mimic
    arch = x86_64
@@ -22,7 +22,7 @@ pkgname = mimic-bpf-git
    depends = libgcc
    depends = libbpf
    depends = libffi
-   depends = mimic-bpf-modules=0.7.1.r2.59950b3
+   depends = mimic-bpf-modules=0.7.1.r6.5df4c27
    optdepends = libxdp: Load multiple XDP programs on one network interface
    provides = mimic-bpf
    conflicts = mimic-bpf
@@ -31,7 +31,7 @@ pkgname = mimic-bpf-dkms-git
    pkgdesc = eBPF UDP -> TCP obfuscator - DKMS module
    arch = any
    depends = dkms
-   provides = mimic-bpf-modules=0.7.1.r2.59950b3
+   provides = mimic-bpf-modules=0.7.1.r6.5df4c27
    provides = mimic-bpf-dkms
-   conflicts = mimic-bpf-modules=0.7.1.r2.59950b3
+   conflicts = mimic-bpf-modules=0.7.1.r6.5df4c27
    conflicts = mimic-bpf-dkms
diff --git a/PKGBUILD b/PKGBUILD
index d7bf544..28a28e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
 _pkgname=mimic
 _pkgbase=$_pkgname-bpf
 pkgname=($_pkgbase-git $_pkgbase-dkms-git)
-pkgver=0.7.1.r2.59950b3
+pkgver=0.7.1.r6.5df4c27
 pkgrel=1
 pkgdesc="eBPF UDP -> TCP obfuscator"
 arch=('x86_64' 'aarch64' 'riscv64')
@@ -44,7 +44,6 @@ package_mimic-bpf-git() {
   install -Dm755 "$srcdir/$_pkgname/out/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
   install -Dm644 "$srcdir/$_pkgname/out/$_pkgname.1.gz" "$pkgdir/usr/share/man/man1/$_pkgname.1.gz"
   install -Dm644 "$srcdir/$_pkgname/install/eth0.conf" "$pkgdir/etc/mimic/eth0.conf"
-  install -Dm644 "$srcdir/$_pkgname/install/$_pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$_pkgname.conf"
   install -Dm644 "$srcdir/$_pkgname/install/$_pkgname@.service" "$pkgdir/usr/lib/systemd/system/$_pkgname@.service"
 }

flylightning commented on 2025-09-21 06:41 (UTC) (edited on 2025-09-22 09:49 (UTC) by flylightning)

mimic failed and coredump after me upgrade all my packages to latest on 2025-09-21T6:36Z, not sure what's the cause, maybe due to latest linux kernel version 6.16.8, but I tried switch to linux-lts and linux-lts-headers but mimic still fail and coredump.

mimic works fine on another computer without upgrade since 2025-09-14T09:20Z, that linux kernel version is 6.16.7.

EDIT: I'm trying to debugging it, with optimization on, the coredump is like:

Sep 21 07:21:16 xyzba systemd-coredump[17633]: [🡕] Process 17630 (mimic) of user 967 dumped core.

                                               Stack trace of thread 17630:
                                               #0  0x00005596d32d8b26 memcpy (/usr/bin/mimic + 0x4b26)
                                               #1  0x00007f9f75427675 n/a (libc.so.6 + 0x27675)
                                               #2  0x00007f9f75427729 __libc_start_main (libc.so.6 + 0x27729)
                                               #3  0x00005596d32da2c5 _start (/usr/bin/mimic + 0x62c5)
                                               ELF object binary architecture: AMD x86-64

with optimization on, the gdb backtrace of the coredump is like:

(gdb) bt
#0  0x00005596d32d8b26 in memcpy (__dest=<optimized out>, __src=<optimized out>, __len=<optimized out>,
    __dest=<optimized out>, __src=<optimized out>, __len=<optimized out>) at /usr/include/bits/string_fortified.h:29
#1  notify_systemd (msg=0x5596d32df7ef "READY=1") at src/notify.c:27
#2  notify_ready () at src/notify.c:42
#3  run_bpf (args=0x7ffcc4f28f68, lock_fd=4, ifname=0x7ffcc4f2be3b "ens18", ifindex=2) at src/run.c:637
#4  subcmd_run (args=0x7ffcc4f28f68) at src/run.c:807
#5  main (argc=<optimized out>, argv=<optimized out>) at src/main.c:20

with optimization off, the coredump is:

Sep 21 07:42:41 xyzba systemd-coredump[437]: [🡕] Process 415 (mimic) of user 967 dumped core.

                                             Stack trace of thread 415:
                                             #0  0x00005642df3f2eac notify_systemd (/usr/bin/mimic + 0x6eac)
                                             #1  0x00005642df3f3078 notify_ready (/usr/bin/mimic + 0x7078)
                                             #2  0x00005642df3f71b3 run_bpf (/usr/bin/mimic + 0xb1b3)
                                             #3  0x00005642df3f858d subcmd_run (/usr/bin/mimic + 0xc58d)
                                             #4  0x00005642df3f28cf main (/usr/bin/mimic + 0x68cf)
                                             #5  0x00007f6730827675 n/a (libc.so.6 + 0x27675)
                                             #6  0x00007f6730827729 __libc_start_main (libc.so.6 + 0x27729)
                                             #7  0x00005642df3ef045 _start (/usr/bin/mimic + 0x3045)
                                             ELF object binary architecture: AMD x86-64

with optimization off, the backtrace is:

(gdb) bt
#0  0x0000563638828eac in notify_systemd (msg=0x563638830a7e "READY=1") at src/notify.c:27
#1  0x0000563638829078 in notify_ready () at src/notify.c:42
#2  0x000056363882d1b3 in run_bpf (args=0x7ffd9c33c338, lock_fd=4, ifname=0x7ffd9c33de3e "ens18", ifindex=2) at src/run.c:637
#3  0x000056363882e58d in subcmd_run (args=0x7ffd9c33c338) at src/run.c:807
#4  0x00005636388288cf in main (argc=5, argv=0x7ffd9c33d918) at src/main.c:20

it seems like related to new systemd version?

EDIT: Somehow this patch fixed the issue, I have no idea why, I just guessed it..., maybe it is completely wrong in someway, but it works:

diff --git a/src/notify.c b/src/notify.c
index bd5dc9a..ec79fad 100644
--- a/src/notify.c
+++ b/src/notify.c
@@ -24,7 +24,7 @@ static int notify_systemd(const char* msg) {
   struct sockaddr_un addr = {.sun_family = AF_UNIX};
   size_t path_len = strlen(socket_path);
   if (path_len >= sizeof(addr.sun_path)) return -E2BIG;
-  memcpy(addr.sun_path, socket_path, sizeof(addr.sun_path));
+  memcpy(addr.sun_path, socket_path, path_len+1);
   if (socket_path[0] == '@') addr.sun_path[0] = 0;

   int sk raii(closep) = socket(AF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);

EDIT: here's the pull request: https://github.com/hack3ric/mimic/pull/26

EDIT: the pull request is merged, it now works without issues