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

panic: runtime error: slice bounds out of range [:108] with length 64 #397

Closed
fanrong1992 opened this issue Sep 25, 2023 · 1 comment · Fixed by #398
Closed

panic: runtime error: slice bounds out of range [:108] with length 64 #397

fanrong1992 opened this issue Sep 25, 2023 · 1 comment · Fixed by #398
Labels
🐞 bug Something isn't working

Comments

@fanrong1992
Copy link

fanrong1992 commented Sep 25, 2023

Device: Pixel6 android 13 kernel 5.10
eCapture v0.6.2

./ecapture tls -i wlan0 -w ecap.pcapng
tls_2023/09/25 03:02:47 ECAPTURE :: ecapture Version : androidgki_aarch64:0.6.2-20230924-5bfc790:[CORE]
tls_2023/09/25 03:02:47 ECAPTURE :: Pid Info : 24748
tls_2023/09/25 03:02:47 ECAPTURE :: Kernel Info : 5.10.157
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL module initialization
tls_2023/09/25 03:02:47 ECAPTURE :: Module.Run()
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL TC MODEL
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL OpenSSL/BoringSSL version not found, used default version :android_default
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL HOOK type:2, binrayPath:/apex/com.android.conscrypt/lib64/libssl.so
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL Ifname:wlan0, Ifindex:47, Port:443, Pcapng filepath:/data/local/tmp/ecap.pcapng
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL Hook masterKey function:SSL_in_init
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL target all process.
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL target all users.
tls_2023/09/25 03:02:47 EBPFProbeOPENSSL BPF bytecode filename:user/bytecode/boringssl_1_1_1_kern.o
tls_2023/09/25 03:02:49 EBPFProbeOPENSSL readEvents error:creating PerfEventArray(skb_events)#15 reader dns: failed to create perf ring for CPU 4: can't mmap: cannot allocate memory
tls_2023/09/25 03:02:49 EBPFProbeOPENSSL module started successfully.
tls_2023/09/25 03:02:49 ECAPTURE :: start 1 modules
tls_2023/09/25 03:03:04 master secret length is too long, truncate to 48 bytes, but it may cause keylog file error
tls_2023/09/25 03:03:04 TLS1_2_VERSION: save CLIENT_RANDOM adfeeb59d67e01cb4fe764ec044822b1aa4c1790ef830ec4494467e56f43b9e4 to file success, 176 bytes
tls_2023/09/25 03:03:04 master secret length is too long, truncate to 48 bytes, but it may cause keylog file error
tls_2023/09/25 03:03:04 TLS1_2_VERSION: save CLIENT_RANDOM 50722361f89b73fa7e3c2c1bcd6ac485224dbf2ff4be527c1752e1143fc28da2 to file success, 176 bytes
panic: runtime error: slice bounds out of range [:108] with length 64

goroutine 65 [running]:
ecapture/user/module.(*MOpenSSLProbe).saveMasterSecretBSSL(0x4000126dc0, 0x4003e5a400)
/source_code/user/module/probe_openssl.go:617 +0x76c
ecapture/user/module.(*MOpenSSLProbe).Dispatcher(0x1dc?, {0x5ddb60?, 0x4003e5a400?})
/source_code/user/module/probe_openssl.go:700 +0x1c4
ecapture/user/module.(*Module).Dispatcher(0x4000126dc0, {0x5ddb60, 0x4003e5a400})
/source_code/user/module/imodule.go:304 +0x120
ecapture/user/module.(*Module).perfEventReader.func1()
/source_code/user/module/imodule.go:231 +0x21c
created by ecapture/user/module.(*Module).perfEventReader
/source_code/user/module/imodule.go:199 +0x174

To Reproduce
Steps to reproduce the behavior:

  1. Starting ecapture './ecapture tls -i wlan0 -w ecap.pcapng'
  2. Click on 'MT App 12.13'
@cfc4n cfc4n added the 🐞 bug Something isn't working label Sep 25, 2023
@cfc4n cfc4n linked a pull request Sep 25, 2023 that will close this issue
@cfc4n cfc4n reopened this Sep 27, 2023
@cfc4n
Copy link
Member

cfc4n commented Sep 27, 2023

fixed at #398 (release v0.6.3), please try again.

@cfc4n cfc4n closed this as completed Oct 4, 2023
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

Successfully merging a pull request may close this issue.

2 participants