freeradius 3.2.5 crashes when configured with status_check=status-server and the server is not responding
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
freeradius (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Undecided
|
Lena Voytek | ||
Oracular |
Fix Released
|
Undecided
|
Lena Voytek | ||
Plucky |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Freeradius proxies on Noble/Oraclular that are configured with "status_check = status-server" (default in Ubuntu) will crash after sending out a status request to an unresponsive server.
The fix for this issue should be backported to prevent users from experiencing segmentation faults in this case.
The issue is fixed by an upstream commit that ignores server-side ping packets in stats as parsing them caused the crash.
[Test Plan]
This issue can be reproduced using lxd:
lxc launch ubuntu:
lxc exec test-freeradius bash
apt update
apt upgrade
apt install freeradius
- Add a test server with an ip that will not respond successfully, pool, and default realm to proxy.conf
cat <<EOF >/etc/freeradiu
home_server server1 {
type = auth
ipaddr = 192.168.0.1 # IP without a responsive server
port = 1812
secret = secret1
status_check = status-server
}
home_server_pool server1_pool {
home_server = server1
}
realm DEFAULT {
nostrip
auth_pool = server1_pool
}
EOF
- stop background freeradius to run with full debug
systemctl stop freeradius
freeradius -X
- In another window:
lxc exec test-freeradius bash
radtest <email address hidden> pass1 127.0.0.1 0 testing123
-In the original window, something like the following will show up over time until there is a crash
(0) Received Access-Request Id 144 from 127.0.0.1:40818 to 127.0.0.1:1812 length 85
(0) Message-
(0) User-Name = "<email address hidden>"
(0) User-Password = "pass1"
...
Waking up in 0.3 seconds.
(0) Expecting proxy response no later than 29.666804 seconds from now
Waking up in 29.6 seconds.
(0) Sending duplicate proxied request to home server 192.168.0.1 port 1812 - ID: 150
(0) Sent Access-Request Id 150 from 0.0.0.0:45332 to 192.168.0.1:1812 length 96
(0) Message-
(0) User-Name = "<email address hidden>"
(0) User-Password = "pass1"
...
(0) Proxy-State = 0x313434
Waking up in 24.9 seconds.
...
No response to status check 1 ID 198 for home server 192.168.0.1 port 1812
Segmentation fault (core dumped)
- When the issue is fixed, freeradius will send out a status message without crashing and continue waiting
[Where problems could occur]
Problems would most likely occur during stats processing, in the case where the request_stats_final function is exited prematurely due to a server ping packet.
[Other Info]
This issue was caused by an upstream regression after jammy's release version and was fixed prior to plucky, so only noble and oracular are affected.
[Original Description]
Hi,
We upgraded a host running freeradius from Ubuntu 22.04 to Ubuntu 24.04 (3.2.5+
[ 541.920486] freeradius[2767]: segfault at 44 ip 00005629c2a28d24 sp 00007ffda6fc0cb8 error 4 in freeradius[
Some Googling found a similar report for Almalinux: https:/
Almalinux's report links to this commit as a fix: https:/
After changing our home_server configuration from "status_check = status-server" to "status_check = none", these crashes stopped.
Related branches
- git-ubuntu bot: Approve
- John Chittum (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 56 lines (+34/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp-2104372-fix-crash-status-server-ping.patch (+26/-0)
debian/patches/series (+1/-0)
- git-ubuntu bot: Approve
- John Chittum (community): Approve
- Canonical Server Reporter: Pending requested
-
Diff: 56 lines (+34/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/lp-2104372-fix-crash-status-server-ping.patch (+26/-0)
debian/patches/series (+1/-0)
description: | updated |
Changed in freeradius (Ubuntu Plucky): | |
status: | New → Fix Released |
Hello, thank you for the bug report and finding a fix! I created a PPA with a patch of the commit for 24.04 - https:/ /launchpad. net/~lvoytek/ +archive/ ubuntu/ freeradius- fix-status- server- ping-crash
If you would like to test it, you can run the following:
sudo add-apt-repository ppa:lvoytek/ freeradius- fix-status- server- ping-crash
sudo apt update
sudo apt upgrade
Thanks!