Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] После обновления на 2.7.1 сервис падает с segmentation fault #147

Closed
alexeydk78 opened this issue Dec 30, 2024 · 10 comments

Comments

@alexeydk78
Copy link

До обновления все работало. После установки обновления 2.7.1 программа стала падать с ошибкой segmentation fault:

root@MKT:~# nfqws
Segmentation fault

Роутер Mikrotik RouterBOARD 951Ui-2HnD
OpenWrt 23.05.5 r24106-10cc5fcd00 / LuCI openwrt-23.05 branch git-24.346.66847-1bb28ba

root@MKT:~# opkg info nfqws-keenetic
Package: nfqws-keenetic
Version: 2.7.1
Depends: libc, iptables, iptables-mod-extra, iptables-mod-nfqueue, iptables-mod-filter, iptables-mod-ipopt, iptables-mod-conntrack-extra, ip6tables, ip6tables-mod-nat, ip6tables-extra
Conflicts: tpws-keenetic
Status: install user installed
Architecture: all
Conffiles:
 /etc/nfqws/auto.list e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 /etc/nfqws/exclude.list 2e08dbc89cee7e1d339c7f15e8ff2d1033488ee8ef40e2f42e1eb0a18fdcef4c
 /etc/nfqws/nfqws.conf 16cea19ed7c6c8e3357008bbc4e4f41ac3cc927732c7bd5047ed228d914f3f71
 /etc/nfqws/user.list 45dc2adaa172b86d73369c6ed12a8a0e648b851b66293b11514c3b1d4bd3fce6
Installed-Time: 1735581068
root@MKT:~# /etc/init.d/nfqws-keenetic  restart
Stopping NFQWS service...
Policy 'nfqws' not found. All traffic will be processed.
Started NFQWS service
root@MKT:~# cat /etc/nfqws/nfqws.conf
# Provider network interface, e.g. eth3
# You can specify multiple interfaces separated by space, e.g. ISP_INTERFACE="eth3 nwg1"
ISP_INTERFACE="pppoe-wan"

# All arguments here: https://github.com/bol-van/zapret (search for `nfqws` on the page)
# HTTP(S) strategy
NFQWS_ARGS="--dpi-desync=fake,multisplit --dpi-desync-split-pos=1,midsld --dpi-desync-ttl=0 --dpi-desync-repeats=16 --dpi-desync-fooling=badseq,md5sig --dpi-desync-fake-tls=/etc/nfqws/tls_clienthello.bin"

# QUIC strategy
NFQWS_ARGS_QUIC="--filter-udp=443 --dpi-desync=fake --dpi-desync-repeats=11 --dpi-desync-fake-quic=/etc/nfqws/quic_initial.bin"

# UDP strategy (doesn't use lists from NFQWS_EXTRA_ARGS)
NFQWS_ARGS_UDP="--filter-udp=50000-50099 --dpi-desync=fake --dpi-desync-any-protocol --dpi-desync-repeats=6 --dpi-desync-cutoff=n2"

# auto - automatically detects blocked resources and adds them to the auto.list
NFQWS_EXTRA_ARGS="--hostlist=/etc/nfqws/user.list --hostlist-auto=/etc/nfqws/auto.list --hostlist-auto-debug=/var/log/nfqws.log --hostlist-exclude=/etc/nfqws/exclude.list"

# list - applies rules only to domains in the user.list
#NFQWS_EXTRA_ARGS="--hostlist=/etc/nfqws/user.list"

# all  - applies rules to all traffic except domains from exclude.list
#NFQWS_EXTRA_ARGS="--hostlist-exclude=/etc/nfqws/exclude.list"

# IPv6 support
IPV6_ENABLED=0

# TCP ports for iptables rules
TCP_PORTS=443

# UDP ports for iptables rules
UDP_PORTS=443,50000:50099

# Keenetic policy name
POLICY_NAME="nfqws"

# Syslog logging level (0 - silent, 1 - debug)
LOG_LEVEL=0

NFQUEUE_NUM=200
USER=nobody
CONFIG_VERSION=5

ps | grep nfqws

root@MKT:~# ps | grep nfqws
 4197 root      1372 S    grep nfqws
@alexeydk78
Copy link
Author

Architecture Atheros AR9344 rev 3
Target Platform ath79/mikrotik

@Anonym-tsk
Copy link
Owner

Я так понимаю, это mips.
Покажите содержимое файлов /etc/opkg.conf и /etc/opkg/distfeeds.conf а также вывод uname -m

@alexeydk78
Copy link
Author

...
root@MKT:~# cat /etc/opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
option check_signature
...

...
root@MKT:~# cat /etc/opkg/distfeeds.conf
src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.5/targets/ath79/mikrotik/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.5/packages/mips_24kc/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.5/packages/mips_24kc/luci
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.5/packages/mips_24kc/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.5/packages/mips_24kc/routing
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.5/packages/mips_24kc/telephony
...

...
root@MKT:~# uname -a
Linux MKT 5.15.167 #0 Mon Sep 23 12:34:46 2024 mips GNU/Linux
...

@Anonym-tsk
Copy link
Owner

Итак, давайте искать где сломалось.
Качайте по очереди релизы https://github.com/bol-van/zapret/releases
Вас интересует файл zapret-vXX-openwrt-embedded.tar.gz
Распаковываете, в каталоге binaries находите mips и берете оттуда бинарник. Можно запустить прям на месте (на роутере).
Если не падает - напишите с какого релиза работает, а в каком сломалось.

@Anonym-tsk
Copy link
Owner

И ещё вариант:
Скачать upx отсюда https://upx.github.io

Распаковать бинарник upx -d nfqws
(можно выполнить на любой системе)
Запустить распакованный бинарник на роутере
Проверить падает ли

@alexeydk78
Copy link
Author

Ок. Для начала посмотрел, что там за мипс:

root@MKT:/tmp# file /usr/bin/nfqws
/usr/bin/nfqws: ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, no section header

Взял такой же из последней версии zapret - v69.9. Работает:

root@MKT:/tmp# ./nfqws
github version v69.9 (35d676406cede0e689910fa9d5b0b2cc7f5b7c1a)

Проверил еще три версии по (69.6)- работают.

А вот распаковать не удалось - говорит, не упакованный он:

root@MKT:~# ./upx-4.2.4-mips_linux/upx -d nfqws
Ultimate Packer for eXecutables
Copyright (C) 1996 - 2024
UPX 4.2.4 Markus Oberhumer, Laszlo Molnar & John Reiser May 9th 2024

    File size         Ratio      Format      Name

upx: nfqws: NotPackedException: not packed by UPX

@Anonym-tsk
Copy link
Owner

Исправлено в 2.7.2
Проверяйте

@alexeydk78
Copy link
Author

Спасибо. Работает.

@LimpingK
Copy link

LimpingK commented Jan 29, 2025

Conflicts: tpws-keenetic

А это нормально?
У меня на 2.7.6 аналогично:

Package: nfqws-keenetic
Version: 2.7.6
Depends: libc, iptables, iptables-mod-extra, iptables-mod-nfqueue, iptables-mod-filter, iptables-mod-ipopt, iptables-mod-conntrack-extra, ip6tables, ip6tables-mod-nat, ip6tables-extra
Conflicts: tpws-keenetic
Status: install ok installed
Section: net
Architecture: all
Size: 851384
Filename: nfqws-keenetic_2.7.6_all.ipk
Conffiles:
 /etc/nfqws/auto.list e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
 /etc/nfqws/exclude.list 7b1d1ef573fe736f132520989a4b8534c611c0a7fdc9d10c323f4589f5e99e94
 /etc/nfqws/nfqws.conf 0e435265380ff191db056cea27e2472ab74cd8e3ef4d3facb994cf69e121393c
 /etc/nfqws/user.list 45dc2adaa172b86d73369c6ed12a8a0e648b851b66293b11514c3b1d4bd3fce6
Description: NFQWS service
Installed-Time: 1738095918

@Anonym-tsk
Copy link
Owner

А это нормально?

Это нормально. Это значит что пакет nfqws-keenetic нельзя установить вместе с пакетом tpws-keenetic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants