[GH-ISSUE #3665] panic: runtime error: invalid memory address or nil pointer dereference #2919

Closed
opened 2026-05-05 13:53:15 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @xqzr on GitHub (Oct 11, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3665

Bug Description

frpc 验证 INI 时“恐慌”

frpc Version

0.52.0

frps Version

0.52.0

System Architecture

linux/amd64

Configurations

[common]
server_addr = frp.wo25.net
server_port = 27100
protocol = quic
token = xqzr
user = ••••
login_fail_exit = false
log_level = debug
tls_trusted_ca_file = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
pool_count = 5
admin_addr = ::1
admin_port = 17400
start = ••••_SSH,#••••,#••••_tcp,#••••_udp,#••••_tcp,#••••_udp,••••_https,••••_quic,••••_MC,••••,#••••,••••_p2p,••••_p2p,#••••_p2p,••••_p2p,••••_p2p,••••_p2p

[••••_SSH]
type = tcp
local_ip = ::1
local_port = 22
remote_port = 21022
meta_uuid = ••••

[••••]
type = tcp
local_ip = 192.168.1.0
local_port = 22
remote_port = 20022

[••••_tcp]
type = tcp
local_ip = 192.168.1.6
local_port = 3389
remote_port = 22389
meta_uuid = ••••

[••••_udp]
type = udp
local_ip = 192.168.1.6
local_port = 3389
remote_port = 22389
meta_uuid = ••••

[••••_tcp]
type = tcp
local_ip = 192.168.1.7
local_port = 3389
remote_port = 21389
meta_uuid = ••••

[••••_udp]
type = udp
local_ip = 192.168.1.7
local_port = 3389
remote_port = 21389
meta_uuid = ••••

[••••_https]
type = tcp
remote_port = 20443
plugin = unix_domain_socket
plugin_unix_path = /dev/shm/••••.socket
meta_uuid = ••••
proxy_protocol_version = v2
#bandwidth_limit = 1500KB

[••••_quic]
type = udp
remote_port = 20443
#plugin = unix_domain_socket
#plugin_unix_path = /dev/shm/••••.socket
local_ip = ::1
local_port = 443
meta_uuid = ••••


[••••_MC]
type = tcp
local_ip = ::1
local_port = 25565
remote_port = 32065
meta_uuid = ••••

[••••_p2p]
type = xtcp
sk = 0
local_ip = ::1
local_port = 25565

[••••-mod]
type = tcp
local_ip = ::1
local_port = 32165
remote_port = 32165
meta_uuid = ••••

[••••]
type = udp
local_ip = ::1
local_port = 19132
remote_port = 32065
meta_uuid = ••••

[••••_p2p]
type = xtcp
sk = ••••
local_ip = ::1
local_port = 22

[••••_p2p]
type = xtcp
sk = ••••
local_ip = 192.168.1.7
local_port = 3389

[••••_tcp_p2p]
type = xtcp
sk = ••••
local_ip = 192.168.1.6
local_port = 3389

[••••_p2p]
type = xtcp
sk = ••••
plugin = unix_domain_socket
plugin_unix_path = /dev/shm/••••.socket

[••••_p2p]
type = xtcp
sk = ••••
plugin = unix_domain_socket
plugin_unix_path = /dev/shm/••••.socket

Logs

No response

Steps to reproduce

frpc verify -c /etc/frp/1.ini

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x838427]

goroutine 1 [running]:
github.com/fatedier/frp/pkg/config.LoadClientConfig.func1({0x0?, 0x0?}, 0x4139b7?)
        github.com/fatedier/frp/pkg/config/load.go:226 +0x27
github.com/samber/lo.Filter[...]({0xc0001e1d00, 0xa, 0xa}, 0xc00017f608?)
        github.com/samber/lo@v1.38.1/slice.go:15 +0xc3
github.com/fatedier/frp/pkg/config.LoadClientConfig({0x7fff221a6642, 0xe})
        github.com/fatedier/frp/pkg/config/load.go:225 +0x9d1
github.com/fatedier/frp/cmd/frpc/sub.glob..func3(0x113a3c0?, {0xb82ecf?, 0x2?, 0x2?})
        github.com/fatedier/frp/cmd/frpc/sub/verify.go:40 +0x45
github.com/spf13/cobra.(*Command).execute(0x113a3c0, {0xc000131560, 0x2, 0x2})
        github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x113a0e0)
        github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.7.0/command.go:992
github.com/fatedier/frp/cmd/frpc/sub.Execute()
        github.com/fatedier/frp/cmd/frpc/sub/root.go:98 +0x25
main.main()
        github.com/fatedier/frp/cmd/frpc/main.go:23 +0x17

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @xqzr on GitHub (Oct 11, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3665 ### Bug Description frpc 验证 INI 时“恐慌” ### frpc Version 0.52.0 ### frps Version 0.52.0 ### System Architecture linux/amd64 ### Configurations ```ini [common] server_addr = frp.wo25.net server_port = 27100 protocol = quic token = xqzr user = •••• login_fail_exit = false log_level = debug tls_trusted_ca_file = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem pool_count = 5 admin_addr = ::1 admin_port = 17400 start = ••••_SSH,#••••,#••••_tcp,#••••_udp,#••••_tcp,#••••_udp,••••_https,••••_quic,••••_MC,••••,#••••,••••_p2p,••••_p2p,#••••_p2p,••••_p2p,••••_p2p,••••_p2p [••••_SSH] type = tcp local_ip = ::1 local_port = 22 remote_port = 21022 meta_uuid = •••• [••••] type = tcp local_ip = 192.168.1.0 local_port = 22 remote_port = 20022 [••••_tcp] type = tcp local_ip = 192.168.1.6 local_port = 3389 remote_port = 22389 meta_uuid = •••• [••••_udp] type = udp local_ip = 192.168.1.6 local_port = 3389 remote_port = 22389 meta_uuid = •••• [••••_tcp] type = tcp local_ip = 192.168.1.7 local_port = 3389 remote_port = 21389 meta_uuid = •••• [••••_udp] type = udp local_ip = 192.168.1.7 local_port = 3389 remote_port = 21389 meta_uuid = •••• [••••_https] type = tcp remote_port = 20443 plugin = unix_domain_socket plugin_unix_path = /dev/shm/••••.socket meta_uuid = •••• proxy_protocol_version = v2 #bandwidth_limit = 1500KB [••••_quic] type = udp remote_port = 20443 #plugin = unix_domain_socket #plugin_unix_path = /dev/shm/••••.socket local_ip = ::1 local_port = 443 meta_uuid = •••• [••••_MC] type = tcp local_ip = ::1 local_port = 25565 remote_port = 32065 meta_uuid = •••• [••••_p2p] type = xtcp sk = 0 local_ip = ::1 local_port = 25565 [••••-mod] type = tcp local_ip = ::1 local_port = 32165 remote_port = 32165 meta_uuid = •••• [••••] type = udp local_ip = ::1 local_port = 19132 remote_port = 32065 meta_uuid = •••• [••••_p2p] type = xtcp sk = •••• local_ip = ::1 local_port = 22 [••••_p2p] type = xtcp sk = •••• local_ip = 192.168.1.7 local_port = 3389 [••••_tcp_p2p] type = xtcp sk = •••• local_ip = 192.168.1.6 local_port = 3389 [••••_p2p] type = xtcp sk = •••• plugin = unix_domain_socket plugin_unix_path = /dev/shm/••••.socket [••••_p2p] type = xtcp sk = •••• plugin = unix_domain_socket plugin_unix_path = /dev/shm/••••.socket ``` ### Logs _No response_ ### Steps to reproduce `frpc verify -c /etc/frp/1.ini` ``` panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x838427] goroutine 1 [running]: github.com/fatedier/frp/pkg/config.LoadClientConfig.func1({0x0?, 0x0?}, 0x4139b7?) github.com/fatedier/frp/pkg/config/load.go:226 +0x27 github.com/samber/lo.Filter[...]({0xc0001e1d00, 0xa, 0xa}, 0xc00017f608?) github.com/samber/lo@v1.38.1/slice.go:15 +0xc3 github.com/fatedier/frp/pkg/config.LoadClientConfig({0x7fff221a6642, 0xe}) github.com/fatedier/frp/pkg/config/load.go:225 +0x9d1 github.com/fatedier/frp/cmd/frpc/sub.glob..func3(0x113a3c0?, {0xb82ecf?, 0x2?, 0x2?}) github.com/fatedier/frp/cmd/frpc/sub/verify.go:40 +0x45 github.com/spf13/cobra.(*Command).execute(0x113a3c0, {0xc000131560, 0x2, 0x2}) github.com/spf13/cobra@v1.7.0/command.go:940 +0x862 github.com/spf13/cobra.(*Command).ExecuteC(0x113a0e0) github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.7.0/command.go:992 github.com/fatedier/frp/cmd/frpc/sub.Execute() github.com/fatedier/frp/cmd/frpc/sub/root.go:98 +0x25 main.main() github.com/fatedier/frp/cmd/frpc/main.go:23 +0x17 ``` ### Affected area - [ ] Docs - [X] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2919
No description provided.