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

SIGSEGV при запуске на OpenWrt 23.05.5 #197

Closed
InHavk opened this issue Nov 30, 2024 · 6 comments
Closed

SIGSEGV при запуске на OpenWrt 23.05.5 #197

InHavk opened this issue Nov 30, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@InHavk
Copy link

InHavk commented Nov 30, 2024

Bug description

Sat Nov 30 20:36:27 2024 kern.info kernel: [ 4352.204440] ra  = 00401f1b in youtubeUnblock[400000+9000]
Sat Nov 30 20:36:27 2024 kern.info kernel: [ 4352.189710] do_page_fault(): sending SIGSEGV to youtubeUnblock for invalid write access to 00000000
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Queue 537 started
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Target sni domains: googlevideo.com,ggpht.com,ytimg.com,youtube.com,play.google.com,youtu.be,googleapis.com,googleusercontent.com,gstatic.com,l.google.com,
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Past seq faking strategy will be used
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Fragmentation Client Hello will be reversed
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Fake SNI will be sent before each target client hello
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Using TCP segmentation
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Section #0
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: The sections will be processed in order they goes in this output
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Detected 1 config sections
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: IPv6 is enabled
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: GSO is enabled
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]:
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: Bypasses deep packet inspection systems that rely on SNI
Sat Nov 30 20:36:26 2024 daemon.info youtubeUnblock[4714]: youtubeUnblock 1.0.0-4

Собран от коммита 7303abd

buildbot@e9f16b0068cc:~/openwrt-sdk-23.05.5-ath79-generic_gcc-12.3.0_musl.Linux-x86_64$ grep "PKG_REV" package/feeds/youtubeUnblock/youtubeUnblock/Makefile
PKG_REV:=7303abdaf2809f0db53efb6ed1b206ab79694a24

Самое долгое что прожил - 30 секунд, в основном сразу падает.

Linux distribution

OpenWRT

Device architecture

DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='23.05.5'
DISTRIB_REVISION='r24106-10cc5fcd00'
DISTRIB_TARGET='ath79/generic'
DISTRIB_ARCH='mips_24kc'
DISTRIB_DESCRIPTION='OpenWrt 23.05.5 r24106-10cc5fcd00'
DISTRIB_TAINTS=''

Configuration

config youtubeUnblock 'youtubeUnblock'
option frag 'tcp'
option frag_sni_reverse '1'
option frag_middle_sni '1'
option frag_sni_pos '1'
option fk_winsize '0'
option seg2delay '0'
option packet_mark '32768'
option fake_sni '1'
option faking_strategy 'pastseq'
option fake_sni_seq_len '1'
option fake_sni_type 'default'
list sni_domains 'googlevideo.com'
list sni_domains 'ggpht.com'
list sni_domains 'ytimg.com'
list sni_domains 'youtube.com'
list sni_domains 'play.google.com'
list sni_domains 'youtu.be'
list sni_domains 'googleapis.com'
list sni_domains 'googleusercontent.com'
list sni_domains 'gstatic.com'
list sni_domains 'l.google.com'

@Waujito
Copy link
Owner

Waujito commented Nov 30, 2024

Очень странно, у меня такого не случалось. Если отсюда скачать https://github.com/Waujito/youtubeUnblock/actions/runs/12090255264 (mips_24kc) что будет? Также убедитесь что все существующие анблоки не работают и попробуйте запустить его вручную с трейс флагом /usr/bin/youtubeUnblock --trace

@InHavk
Copy link
Author

InHavk commented Nov 30, 2024

Проблема повторилась.

root@OpenWrt:~# /usr/bin/youtubeUnblock --sni-domains=googlevideo.com,ggpht.com,ytimg.com,youtube.com,play.google.com,youtu.be,googleapis.com,googleusercontent.com,gstatic.com,l.google.com, --fake-sni-seq-len=1 --faking-strategy=pastseq --frag=tcp --frag-sni-pos=1 --fk-winsize=0 --seg2delay=0 --packet-mark=32768 --fake-sni=1 --frag-sni-reverse=1 --frag-sni-faked=0 --frag-middle-sni=1 --synfake=0 --trace
youtubeUnblock 1.0.0-4
Bypasses deep packet inspection systems that rely on SNI

GSO is enabled
IPv6 is enabled
Detected 1 config sections
The sections will be processed in order they goes in this output
Section #0
Using TCP segmentation
Fake SNI will be sent before each target client hello
Fragmentation Client Hello will be reversed
Past seq faking strategy will be used
Target sni domains: googlevideo.com,ggpht.com,ytimg.com,youtube.com,play.google.com,youtu.be,googleapis.com,googleusercontent.com,gstatic.com,l.google.com,
Queue 537 started
[TRACE]  ( IPv4, TCP, Section #0, TLS analyzed, continue_flow, ) 
[TRACE]  ( IPv4, TCP, Section #0, TLS analyzed, continue_flow, ) 
[TRACE]  ( IPv4, TCP, Section #0, TLS analyzed, continue_flow, ) 
[TRACE]  ( IPv4, TCP, Section #0, TLS analyzed, continue_flow, ) 
Segmentation fault

Из замеченного сейчас - краш только в момент обработки пакетов с youtube. Пока этого трафика нет - все работает отлично.
До этого видимо было какое-то устройство, которое из сети ломилось туда, но я не обратил на это внимание.

@Waujito
Copy link
Owner

Waujito commented Nov 30, 2024

Самый важный лог не отправился из-за сегфолта) Дайте ему флаг --syslog и, после того как крашнется, сделайте logread -l 100

@InHavk
Copy link
Author

InHavk commented Dec 1, 2024

...
Sun Dec  1 12:35:45 2024 user.info : [TRACE]  (
Sun Dec  1 12:35:45 2024 user.info : IPv4,
Sun Dec  1 12:35:45 2024 user.info : TCP,
Sun Dec  1 12:35:45 2024 user.info : Section #0,
Sun Dec  1 12:35:45 2024 user.info : TLS analyzed,
Sun Dec  1 12:35:45 2024 user.info : continue_flow,
Sun Dec  1 12:35:45 2024 user.info : )
Sun Dec  1 12:35:47 2024 user.info : [TRACE]  (
Sun Dec  1 12:35:47 2024 user.info : IPv4,
Sun Dec  1 12:35:47 2024 user.info : UDP,
Sun Dec  1 12:35:47 2024 user.info : Section #0,
Sun Dec  1 12:35:47 2024 user.info : UDP payload start: [ 46 ec 57 0b 40 be 12 25 db e4 ],
Sun Dec  1 12:35:47 2024 user.info : continue_flow,
Sun Dec  1 12:35:47 2024 kern.info kernel: [43954.640040] do_page_fault(): sending SIGSEGV to youtubeUnblock for invalid write access to 00000000
Sun Dec  1 12:35:47 2024 kern.info kernel: [43954.650013] epc = 77da29cc in libc.so[77d7e000+ab000]
Sun Dec  1 12:35:47 2024 kern.info kernel: [43954.655369] ra  = 00401f1b in youtubeUnblock[400000+9000]

Waujito added a commit that referenced this issue Dec 1, 2024
The bug was reported in #197. Caused by insufficient size of logging
buffer.
@Waujito Waujito added the bug Something isn't working label Dec 1, 2024
@Waujito
Copy link
Owner

Waujito commented Dec 1, 2024

Кто-то не умеет считать :) при логировании UDP пакета буфер переполнялся.
Спасибо за оперативное тестирование и репорт! Все версии обновил. Можете либо самостоятельно собирать, либо скачать из Actions: https://github.com/Waujito/youtubeUnblock/actions/runs/12106718808

@Waujito
Copy link
Owner

Waujito commented Dec 2, 2024

Полагаю, проблема ушла, закрываю issue.

@Waujito Waujito closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants