You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's no error in s.ExecuteWithResponse(cmd), err is nil and then later if len(parts) < 3 , then there's a crash scenario because we're calling function .Error() on a nil err.
I'm observing that in my tests.
Environment:
HAproxy version: 2.8.0-01b97d-15, this behavior is confirmed in 2.9-dev9-f1f8e2-108 (master HEAD, as of today) as well.
clientnative: v4.1.3 This is an older library, but I see a similar scenario possibility in HEAD, as shared above.
client-native socket is configured to work with MasterSocket.
After some debugging, the response of "prepare acl" command is missing "first part, note the missing : in the beginning".
If I use runtimeoptions.Socket instead of runtime.MasterSocket, the response is different, which doesn't trigger this condition.
It seems that set severity-output; is ignored in MasterSocket scenario.
➤ echo'set severity-output number; prepare acl #18'| socat stdio /export/content/lid/apps/traffic-gateway/i001/haproxy.sock
[6]: New version created: 29
➤ echo'@1 set severity-output number;@1 prepare acl #18'| socat stdio /export/content/lid/apps/traffic-gateway/i001/master.sock
New version created: 30
Stacktrace when using runtimeoptions.MasterSocket:-
The text was updated successfully, but these errors were encountered:
shadyabhi
changed the title
nil pointer dereference crash when using PrepareACL
nil pointer dereference crash when using PrepareACL when MasterSocket is used
Nov 17, 2023
In this location, we use
err.Error()
after a potential situation oferr == nil
.client-native/runtime/acls.go
Line 177 in bee8caf
If there's no error in
s.ExecuteWithResponse(cmd)
,err is nil
and then laterif len(parts) < 3
, then there's a crash scenario because we're calling function.Error()
on anil err
.I'm observing that in my tests.
Environment:
HAproxy version:
2.8.0-01b97d-15
, this behavior is confirmed in2.9-dev9-f1f8e2-108
(master HEAD, as of today) as well.clientnative:
v4.1.3
This is an older library, but I see a similar scenario possibility in HEAD, as shared above.client-native socket is configured to work with
MasterSocket
.After some debugging, the response of "prepare acl" command is missing "first part, note the missing : in the beginning".
If I use
runtimeoptions.Socket
instead ofruntime.MasterSocket
, theresponse
is different, which doesn't trigger this condition.It seems that
set severity-output;
is ignored inMasterSocket
scenario.Stacktrace when using
runtimeoptions.MasterSocket
:-The text was updated successfully, but these errors were encountered: