Package Details: mimic-bpf-dkms-git 0.6.3.r2.5c8cf13-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: 2025-01-16 08:55 (UTC)

Dependencies (8)

Required by (2)

Sources (1)

Latest Comments

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