squid crash basic auth used delay_pools
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Squid |
Unknown
|
Unknown
|
||||
squid (Ubuntu) | Status tracked in Mantic | |||||
Jammy |
Triaged
|
Undecided
|
Sergio Durigan Junior | |||
Kinetic |
Triaged
|
Undecided
|
Sergio Durigan Junior | |||
Lunar |
Triaged
|
Undecided
|
Sergio Durigan Junior | |||
Mantic |
Triaged
|
Undecided
|
Sergio Durigan Junior |
Bug Description
Basic authentication is defined in squid.conf (users are defined in the file "USERS.
-------
auth_param basic program /usr/lib/
acl users_unlim proxy_auth luproxy
delay_pools 1
delay_class 1 1
delay_parameters 1 1024/1024
delay_access 1 allow users_unlim
delay_access 1 deny all
-------
#cat USERS.internet_
#
luproxy:
-------
if you run the request under the user "luproxy" - squid will crash
--- stack trace ---
#0 0x000055ab70417679 in Auth::SchemeCon
config = 0x55ab721763f0
rmb = {<Packable> = {_vptr.Packable = 0x55ab707aab28 <vtable for MemBuf+16>}, static CBDATA_MemBuf = 10, buf = 0x55ab728fa210 "", size = 0, max_capacity = 2097152000, capacity = 2048, stolen = 0}
#1 0x000055ab7041be5d in Auth::UserReque
proxy_auth = 0x55ab75beff70 "Basic bHVwcm94eTpuY2k
#2 0x000055ab7041c5bc in Auth::UserReque
t = {p_ = 0x0}
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: squid 5.2-1ubuntu4.3
ProcVersionSign
Uname: Linux 5.15.0-71-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckR
Date: Thu May 4 15:46:00 2023
InstallationDate: Installed on 2023-05-03 (0 days ago)
InstallationMedia: Ubuntu-Server 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230217.1)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=ru_RU.UTF-8
SHELL=/bin/bash
SourcePackage: squid
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
description: | updated |
summary: |
- squid crash basic auth + squid crash basic auth used delay_pools |
description: | updated |
description: | updated |
Changed in squid (Ubuntu): | |
status: | New → Triaged |
Thanks for reporting a bug and helping make Ubuntu better.
I tried to reproduce the problem here, but I think I'm missing something. Maybe you could help me figure it out.
First, I set up squid inside a Jammy container and added the following lines to /etc/squid/ squid.conf:
auth_param basic program /usr/lib/ squid/basic_ ncsa_auth /etc/squid/ private/ USERS.internet_ plain
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
http_access deny all
acl users_unlim proxy_auth test
delay_pools 1
delay_class 1 1
delay_parameters 1 1024/1024
delay_access 1 allow users_unlim
delay_access 1 deny all
Then, I created the file /etc/squid/ private/ USERS.internet_ plain and added the "test" user to it:
# htpasswd -b /etc/squid/ private/ USERS.internet_ plain test test
I restarted the service, then created another container and tried to use curl with the proxy. Here's what I'm getting:
# curl -vvvv -x test:test@ 10.96.142. 20:3128 example.com 20:3128. .. example. com/ HTTP/1.1 tion: Basic dGVzdDp0ZXN0
* Trying 10.96.142.
* Connected to (nil) (10.96.142.20) port 3128 (#0)
* Proxy auth using Basic with user 'test'
> GET http://
> Host: example.com
> Proxy-Authoriza
> User-Agent: curl/7.81.0
> Accept: */*
> Proxy-Connection: Keep-Alive
>
* Empty reply from server
* Closing connection 0
curl: (52) Empty reply from server
When I look at the squid logs, I see that apparently the basic_ncsa_auth script wasn't invoked:
2023/05/09 15:44:41 kid1| Set Current Directory to /var/spool/squid pc-linux- gnu... /var/log/ squid/access. log squid/access. log
2023/05/09 15:44:41 kid1| Starting Squid Cache version 5.2 for x86_64-
2023/05/09 15:44:41 kid1| Service Name: squid
2023/05/09 15:44:41 kid1| Process ID 2515
2023/05/09 15:44:41 kid1| Process Roles: worker
2023/05/09 15:44:41 kid1| With 1024 file descriptors available
2023/05/09 15:44:41 kid1| Initializing IP Cache...
2023/05/09 15:44:41 kid1| DNS Socket created at [::], FD 8
2023/05/09 15:44:41 kid1| DNS Socket created at 0.0.0.0, FD 9
2023/05/09 15:44:41 kid1| Adding nameserver 127.0.0.53 from /etc/resolv.conf
2023/05/09 15:44:41 kid1| Adding domain lxd from /etc/resolv.conf
2023/05/09 15:44:41 kid1| helperOpenServers: Starting 0/20 'basic_ncsa_auth' processes
2023/05/09 15:44:41 kid1| helperOpenServers: No 'basic_ncsa_auth' processes needed.
2023/05/09 15:44:41 kid1| Logfile: opening log daemon:
2023/05/09 15:44:41 kid1| Logfile Daemon: opening log /var/log/
2023/05/09 15:44:41 kid1| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2023/05/09 15:44:41 kid1| Store logging disabled
2023/05/09 15:44:41 kid1| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2023/05/09 15:44:41 kid1| Target number of buckets: 1008
2023/05/09 15:44:41 kid1| Using 8192 Store buckets
2023/05/09 15:44:41 kid1| Max Mem size: 262144 KB
2023/05/09 15:44:41 kid1| Max Swap size: 0 KB
Could you please take a look at what I did and let me know if there's anything missing?
I will mark this bug as Incomplete in order to make it clear that we're still missing some reproduction steps. Please mark it back to New once you provide the require info. Thanks.