]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 years agocall afr_atomic_queue_free() instead of talloc_free. Fixes #4987
Alan T. DeKok [Mon, 15 May 2023 10:57:32 +0000 (06:57 -0400)] 
call afr_atomic_queue_free() instead of talloc_free.  Fixes #4987

2 years agoforce packet type foo when running post-auth-type foo. Helps with #4980
Alan T. DeKok [Thu, 11 May 2023 08:13:32 +0000 (10:13 +0200)] 
force packet type foo when running post-auth-type foo.  Helps with #4980

2 years agoClear any old module instances before reloading
Nick Porter [Thu, 11 May 2023 16:55:40 +0000 (17:55 +0100)] 
Clear any old module instances before reloading

Avoids bursting memory usage when reloading large modules e.g. rlm_files
with large data files.

2 years agoUpdate panic_action in radiusd.conf (#4986)
martinsta [Wed, 10 May 2023 12:53:51 +0000 (14:53 +0200)] 
Update panic_action in radiusd.conf (#4986)

panic.gdb is available in raddb directory
one dollar sign will do to reference a config variable

2 years agoUpdate panic_action in radiusd.conf (#4985)
martinsta [Wed, 10 May 2023 12:53:31 +0000 (14:53 +0200)] 
Update panic_action in radiusd.conf (#4985)

panic.gdb is available in raddb directory
one dollar sign will do to reference a config variable

2 years agoclean up error handling on connection failure.
Alan T. DeKok [Sun, 7 May 2023 15:31:42 +0000 (17:31 +0200)] 
clean up error handling on connection failure.

try_connect() does nothing other than return an error, instead
of doing various cleanups

Error paths from callers of try_connect() now call tls_socket_close()
instead of manually doing various things to clean up the listener.

mutex locks have been somewhat minimized on error paths

2 years agoremove TLS_MUTEX macro as it's no longer needed
Alan T. DeKok [Sat, 29 Apr 2023 13:51:57 +0000 (09:51 -0400)] 
remove TLS_MUTEX macro as it's no longer needed

2 years agoCorrectly report the LDAP group a user was found in. Fixes #3084
Nick Porter [Thu, 4 May 2023 08:40:13 +0000 (09:40 +0100)] 
Correctly report the LDAP group a user was found in. Fixes #3084

2 years agoRemove unused parameter
Nick Porter [Mon, 1 May 2023 09:59:55 +0000 (10:59 +0100)] 
Remove unused parameter

2 years agoremove fr_event_fd_want_read() and want_write()
Alan T. DeKok [Sat, 29 Apr 2023 13:30:17 +0000 (09:30 -0400)] 
remove fr_event_fd_want_read() and want_write()

They are no longer needed

2 years agobuffer outbound proxy data if the socket is not yet connected
Alan T. DeKok [Sat, 29 Apr 2023 01:54:55 +0000 (21:54 -0400)] 
buffer outbound proxy data if the socket is not yet connected

and write it out when the socket is connected.

2 years agofixes for OSX
Alan T. DeKok [Sat, 29 Apr 2023 01:29:20 +0000 (21:29 -0400)] 
fixes for OSX

2 years agoSSL_READ and SSL_WRITE are "more negotiation needed"
Alan T. DeKok [Fri, 28 Apr 2023 21:28:45 +0000 (17:28 -0400)] 
SSL_READ and SSL_WRITE are "more negotiation needed"

2 years agoinclude <netinet/tcp.h> for TCP_NODELAY
Alan T. DeKok [Fri, 28 Apr 2023 18:38:50 +0000 (14:38 -0400)] 
include <netinet/tcp.h> for TCP_NODELAY

2 years agonote that realm names comparisons are case insensitive
Alan T. DeKok [Wed, 26 Apr 2023 17:29:24 +0000 (13:29 -0400)] 
note that realm names comparisons are case insensitive

2 years agoadd Error-Cause = Invalid EAP Packet (Ignored)
Alan T. DeKok [Wed, 26 Apr 2023 14:03:20 +0000 (10:03 -0400)] 
add Error-Cause = Invalid EAP Packet (Ignored)

when rejecting EAP packets in the pre-proxy stage

2 years agodon't decode Original-Packet-Code or Message-Authenticator
Alan T. DeKok [Wed, 26 Apr 2023 13:41:29 +0000 (09:41 -0400)] 
don't decode Original-Packet-Code or Message-Authenticator

If we really cared, we'd decode them as unknown attributes

2 years agonote recent changes
Alan T. DeKok [Mon, 24 Apr 2023 20:41:41 +0000 (16:41 -0400)] 
note recent changes

2 years agotypo
Alan T. DeKok [Mon, 24 Apr 2023 19:44:56 +0000 (15:44 -0400)] 
typo

2 years agoonly call OpenSSL functions if we're using OpenSSL
Alan T. DeKok [Mon, 24 Apr 2023 18:46:52 +0000 (14:46 -0400)] 
only call OpenSSL functions if we're using OpenSSL

2 years agoDebian 9 is EOL and no longer in repos
Nick Porter [Mon, 24 Apr 2023 13:13:52 +0000 (14:13 +0100)] 
Debian 9 is EOL and no longer in repos

2 years agoOnly set CRL_CHECK if option is set to yes
Nick Porter [Mon, 24 Apr 2023 08:52:32 +0000 (09:52 +0100)] 
Only set CRL_CHECK if option is set to yes

2 years agoReport which SSL library libldap is using.
Nick Porter [Mon, 24 Apr 2023 08:42:14 +0000 (09:42 +0100)] 
Report which SSL library libldap is using.

2 years agoset TCP_NODELAY. Hopefully helps with #3501
Alan T. DeKok [Fri, 21 Apr 2023 14:22:05 +0000 (10:22 -0400)] 
set TCP_NODELAY. Hopefully helps with #3501

2 years agoinclude header file
Alan T. DeKok [Thu, 20 Apr 2023 14:49:21 +0000 (10:49 -0400)] 
include header file

2 years agonote that we don't support "-=". Fixes #3475
Alan T. DeKok [Thu, 20 Apr 2023 14:20:00 +0000 (10:20 -0400)] 
note that we don't support "-=".  Fixes #3475

2 years agoadd "check_crl". Fixes #4917
Alan T. DeKok [Thu, 20 Apr 2023 14:13:59 +0000 (10:13 -0400)] 
add "check_crl".  Fixes #4917

2 years agodo not encode Message-Authenticator for RADIUS/1.1
Alan T. DeKok [Wed, 19 Apr 2023 00:57:55 +0000 (20:57 -0400)] 
do not encode Message-Authenticator for RADIUS/1.1

2 years agouse "radiusv1_1" for consistency with "disable_tlsv1_1", etc.
Alan T. DeKok [Tue, 18 Apr 2023 13:44:40 +0000 (09:44 -0400)] 
use "radiusv1_1" for consistency with "disable_tlsv1_1", etc.

2 years agoas found on the net.
Alan T. DeKok [Mon, 17 Apr 2023 13:10:45 +0000 (09:10 -0400)] 
as found on the net.

2 years agonote that the msg_version is the TLS version
Alan T. DeKok [Fri, 14 Apr 2023 14:42:37 +0000 (10:42 -0400)] 
note that the msg_version is the TLS version

and therefore print it as hex

2 years agouse correct debug message
Alan T. DeKok [Fri, 14 Apr 2023 14:37:43 +0000 (10:37 -0400)] 
use correct debug message

2 years agouse "radius_1_1" instead of "radiusv11"
Alan T. DeKok [Fri, 14 Apr 2023 14:11:16 +0000 (10:11 -0400)] 
use "radius_1_1" instead of "radiusv11"

2 years agoremove debugging
Alan T. DeKok [Fri, 14 Apr 2023 13:11:40 +0000 (09:11 -0400)] 
remove debugging

2 years agowhitespace
Alan T. DeKok [Fri, 14 Apr 2023 12:38:45 +0000 (08:38 -0400)] 
whitespace

2 years agoallocate and use 32-bit Token
Alan T. DeKok [Fri, 14 Apr 2023 12:34:01 +0000 (08:34 -0400)] 
allocate and use 32-bit Token

and minor cleanups for debugging, and use Token as ID

2 years agominor tweaks to RADIUSv11 flags and debug output
Alan T. DeKok [Fri, 14 Apr 2023 02:44:33 +0000 (22:44 -0400)] 
minor tweaks to RADIUSv11 flags and debug output

so that we set sock->radiusv11 in only one place, and we don't
print Message-Authenticator when proxying over RADIUSv11

2 years agoadd stub function for linking
Alan T. DeKok [Thu, 13 Apr 2023 15:00:22 +0000 (11:00 -0400)] 
add stub function for linking

2 years agoadd configure flag for RADIUSv11
Alan T. DeKok [Thu, 13 Apr 2023 14:51:31 +0000 (10:51 -0400)] 
add configure flag for RADIUSv11

2 years agomacros to help with RADIUSv11
Alan T. DeKok [Thu, 13 Apr 2023 14:46:58 +0000 (10:46 -0400)] 
macros to help with RADIUSv11

2 years agoremove "radius/1.0" as it's not needed
Alan T. DeKok [Thu, 13 Apr 2023 14:46:19 +0000 (10:46 -0400)] 
remove "radius/1.0" as it's not needed

2 years agoone more WANT_READ patch. Helps with #3501
Alan T. DeKok [Thu, 13 Apr 2023 12:26:53 +0000 (08:26 -0400)] 
one more WANT_READ patch.  Helps with #3501

2 years agotypo
Alan T. DeKok [Thu, 13 Apr 2023 12:26:45 +0000 (08:26 -0400)] 
typo

2 years agoset WANT_READ and WANT_WRITE. Helps with #3501
Alan T. DeKok [Thu, 13 Apr 2023 12:14:00 +0000 (08:14 -0400)] 
set WANT_READ and WANT_WRITE.  Helps with #3501

2 years agotypo
Alan T. DeKok [Wed, 12 Apr 2023 15:18:41 +0000 (11:18 -0400)] 
typo

2 years agoadd radiusv11 parsing for home servers
Alan T. DeKok [Wed, 12 Apr 2023 15:03:57 +0000 (11:03 -0400)] 
add radiusv11 parsing for home servers

2 years agoimplemnt ALPN checks and negotiation in listeners
Alan T. DeKok [Wed, 12 Apr 2023 15:02:17 +0000 (11:02 -0400)] 
implemnt ALPN checks and negotiation in listeners

2 years agoadd radiusv11 parsing for clients
Alan T. DeKok [Wed, 12 Apr 2023 14:54:19 +0000 (10:54 -0400)] 
add radiusv11 parsing for clients

2 years agoadd radiusv11 to tls{} section and parsing
Alan T. DeKok [Wed, 12 Apr 2023 14:52:04 +0000 (10:52 -0400)] 
add radiusv11 to tls{} section and parsing

2 years agoset up RADIUS packet encoder / decoder for RADIUSv11
Alan T. DeKok [Wed, 12 Apr 2023 14:50:42 +0000 (10:50 -0400)] 
set up RADIUS packet encoder / decoder for RADIUSv11

2 years agonote recent changes
Alan T. DeKok [Tue, 11 Apr 2023 12:46:36 +0000 (08:46 -0400)] 
note recent changes

2 years agorearrange so we wake up
Alan T. DeKok [Sun, 9 Apr 2023 16:02:32 +0000 (12:02 -0400)] 
rearrange so we wake up

2 years agoadd "want_read" and "want_write" callbacks.
Alan T. DeKok [Sun, 9 Apr 2023 15:22:40 +0000 (11:22 -0400)] 
add "want_read" and "want_write" callbacks.

2 years agonote recent changes
Alan T. DeKok [Fri, 7 Apr 2023 13:58:10 +0000 (09:58 -0400)] 
note recent changes

2 years agogive polite message about socket closing
Alan T. DeKok [Fri, 7 Apr 2023 13:50:01 +0000 (09:50 -0400)] 
give polite message about socket closing

2 years agofix ASAN issues. Fixes #4968
Alan T. DeKok [Fri, 7 Apr 2023 12:11:18 +0000 (08:11 -0400)] 
fix ASAN issues.  Fixes #4968

2 years agoci: Add ASAN/LSAN options (#4969)
Jorge Pereira [Fri, 7 Apr 2023 12:06:36 +0000 (09:06 -0300)] 
ci: Add ASAN/LSAN options (#4969)

2 years agorevert to using sock->mutex again
Alan T. DeKok [Fri, 7 Apr 2023 02:11:17 +0000 (22:11 -0400)] 
revert to using sock->mutex again

2 years agoit helps to initialize mutexes.
Alan T. DeKok [Fri, 7 Apr 2023 02:09:41 +0000 (22:09 -0400)] 
it helps to initialize mutexes.

2 years agomore mutex locks around common data
Alan T. DeKok [Fri, 7 Apr 2023 01:46:14 +0000 (21:46 -0400)] 
more mutex locks around common data

2 years agoblock.sh: Add cleanup statement to avoid exit and let the server blocked (#4967)
Jorge Pereira [Thu, 6 Apr 2023 19:51:39 +0000 (16:51 -0300)] 
block.sh: Add cleanup statement to avoid exit and let the server blocked (#4967)

2 years agonote recent changes
Alan T. DeKok [Thu, 6 Apr 2023 19:48:24 +0000 (15:48 -0400)] 
note recent changes

2 years agoScript to randomly block connections
Alan T. DeKok [Thu, 6 Apr 2023 19:31:35 +0000 (15:31 -0400)] 
Script to randomly block connections

2 years agouse a global mutex for TLS, not a per-socket mutex.
Alan T. DeKok [Thu, 6 Apr 2023 19:24:20 +0000 (15:24 -0400)] 
use a global mutex for TLS, not a per-socket mutex.

Apparently accessing the SSL_SESSION also requires mutex-protected
access to the underlying SSL_CTX.  So we set a global mutex, which
will slow things down a bit in the contended case.  But it won't
cause blocking issues which stops the server entirely.

2 years agoAdd assert to catch invalid mutex (#4960)
Jorge Pereira [Thu, 6 Apr 2023 19:00:04 +0000 (16:00 -0300)] 
Add assert to catch invalid mutex (#4960)

2 years agoneed this, too
Alan T. DeKok [Thu, 6 Apr 2023 18:55:16 +0000 (14:55 -0400)] 
need this, too

2 years agoadd accounting, and do minor cleanups
Alan T. DeKok [Thu, 6 Apr 2023 17:03:36 +0000 (13:03 -0400)] 
add accounting, and do minor cleanups

2 years agoallow FR_LIBRARY_PATH to pass through, if it's already set
Alan T. DeKok [Thu, 6 Apr 2023 17:00:07 +0000 (13:00 -0400)] 
allow FR_LIBRARY_PATH to pass through, if it's already set

2 years agopass FR_LIBRARY_PATH if it's already set
Alan T. DeKok [Thu, 6 Apr 2023 16:58:45 +0000 (12:58 -0400)] 
pass FR_LIBRARY_PATH if it's already set

2 years agoclose the TLS socket on TLS errors.
Alan T. DeKok [Wed, 5 Apr 2023 20:53:35 +0000 (16:53 -0400)] 
close the TLS socket on TLS errors.

If there's a TLS connection error, then the only way to recover
is to close the socket and start over from scratch.

2 years agoconfiguration and scripts to test high load UDP -> TLS proxying
Alan T. DeKok [Wed, 5 Apr 2023 20:48:55 +0000 (16:48 -0400)] 
configuration and scripts to test high load UDP -> TLS proxying

2 years agoremove extraneous echo
Alan T. DeKok [Wed, 5 Apr 2023 19:56:09 +0000 (15:56 -0400)] 
remove extraneous echo

2 years agoWrap all uses of ssl_mutexes in the same ifdef
Nick Porter [Tue, 4 Apr 2023 15:15:16 +0000 (16:15 +0100)] 
Wrap all uses of ssl_mutexes in the same ifdef

2 years agoFix missing phtread destroy (#4957)
Jorge Pereira [Mon, 3 Apr 2023 19:05:34 +0000 (16:05 -0300)] 
Fix missing phtread destroy (#4957)

As we are calling pthread_mutex_init(), we should call
pthread_mutex_destroy() to release all initialized mutexs.

2 years agoFix typo (#4956)
Jorge Pereira [Mon, 3 Apr 2023 19:01:20 +0000 (16:01 -0300)] 
Fix typo (#4956)

2 years agotypo
Alan T. DeKok [Mon, 3 Apr 2023 16:05:16 +0000 (12:05 -0400)] 
typo

2 years agomore cleanups
Alan T. DeKok [Sat, 1 Apr 2023 14:30:14 +0000 (10:30 -0400)] 
more cleanups

2 years agojust use OpenSSL thread IDs
Alan T. DeKok [Sat, 1 Apr 2023 14:17:20 +0000 (10:17 -0400)] 
just use OpenSSL thread IDs

which uses the address of "errno".  That is thread-local on all
platforms we care about.

2 years agoFix runtime LSAN/ASAN out of bound index (#4942)
Jorge Pereira [Thu, 30 Mar 2023 14:56:24 +0000 (11:56 -0300)] 
Fix runtime LSAN/ASAN out of bound index (#4942)

Such error:

Process 369882 stopped
* thread #4, name = 'radiusd', stop reason = Out of bounds index
    frame #0: 0x00005555556e7c10 radiusd`__ubsan_on_report
radiusd`__ubsan_on_report:
->  0x5555556e7c10 <+0>: retq
    0x5555556e7c11:      nopw   %cs:(%rax,%rax)
    0x5555556e7c1b:      nopl   (%rax,%rax)
radiusd`__ubsan_get_current_report_data:
    0x5555556e7c20 <+0>: pushq  %rbx
lldb> vt
error: 'vt' is not a valid command.
lldb> bt
* thread #4, name = 'radiusd', stop reason = Out of bounds index
  * frame #0: 0x00005555556e7c10 radiusd`__ubsan_on_report
    frame #1: 0x00005555556e29c6 radiusd`__ubsan::Diag::~Diag() + 214
    frame #2: 0x00005555556e5814 radiusd`handleOutOfBoundsImpl(__ubsan::OutOfBoundsData*, unsigned long, __ubsan::ReportOptions) + 340
    frame #3: 0x00005555556e588e radiusd`__ubsan_handle_out_of_bounds_abort + 46
    frame #4: 0x00007ffff7e2fd5f libfreeradius-radius.so`fr_rand_seed(data=0x000062501c0aeae0, size=20) at radius.c:5019:45
    frame #5: 0x00007ffff7e2f865 libfreeradius-radius.so`rad_decode(packet=<unavailable>, original=<unavailable>, secret=<unavailable>) at radius.c:4551:2
    frame #6: 0x000055555571631d radiusd`client_socket_decode(listener=<unavailable>, request=<unavailable>) at listen.c:2404:9
    frame #7: 0x000055555575df97 radiusd`request_running [inlined] request_pre_handler(request=0x000062501c0aeb70, action=<unavailable>) at process.c:1379:11
    frame #8: 0x000055555575de92 radiusd`request_running(request=0x000062501c0aeb70, action=<unavailable>) at process.c:1676:8
    frame #9: 0x0000555555758f76 radiusd`request_handler_thread(arg=0x0000606000010880) at threads.c:826:3
    frame #10: 0x00007ffff7490402 libc.so.6`start_thread(arg=<unavailable>) at pthread_create.c:442:8
    frame #11: 0x00007ffff751f590 libc.so.6`__clone3 at clone3.S:81
lldb>

2 years agocall the correct API...
Alan T. DeKok [Thu, 30 Mar 2023 02:41:59 +0000 (11:41 +0900)] 
call the correct API...

2 years agotypo
Alan T. DeKok [Thu, 30 Mar 2023 02:30:43 +0000 (11:30 +0900)] 
typo

2 years agolet's remove the timer events when we free the socket, m'kay?
Alan T. DeKok [Thu, 30 Mar 2023 02:26:33 +0000 (11:26 +0900)] 
let's remove the timer events when we free the socket, m'kay?

2 years agomore checks and sanity
Alan T. DeKok [Thu, 30 Mar 2023 02:23:35 +0000 (11:23 +0900)] 
more checks and sanity

allow extended types

2 years agofix paths for v3
Alan T. DeKok [Thu, 30 Mar 2023 01:16:52 +0000 (10:16 +0900)] 
fix paths for v3

2 years agocopy from v4
Alan T. DeKok [Thu, 30 Mar 2023 01:05:27 +0000 (10:05 +0900)] 
copy from v4

2 years agofix CI
Alan T. DeKok [Wed, 29 Mar 2023 11:55:20 +0000 (20:55 +0900)] 
fix CI

2 years agotry to shut up clang scan
Alan T. DeKok [Wed, 29 Mar 2023 11:31:02 +0000 (20:31 +0900)] 
try to shut up clang scan

which assumes (a) this->type == DETAIL, followed by assuming that
(b) this->type != DETAIL

So it's not tracking things correctly as the listener isn't being
changed during all that.

2 years agohopefully one last fix
Alan T. DeKok [Wed, 29 Mar 2023 08:54:14 +0000 (17:54 +0900)] 
hopefully one last fix

2 years agoonly access "sock" for socket listeners
Alan T. DeKok [Wed, 29 Mar 2023 08:25:55 +0000 (17:25 +0900)] 
only access "sock" for socket listeners

2 years agomove "dead" to public value
Alan T. DeKok [Wed, 29 Mar 2023 08:06:11 +0000 (17:06 +0900)] 
move "dead" to public value

2 years agocheck EAP header byte 0, too, and add debug messages
Alan T. DeKok [Wed, 29 Mar 2023 08:05:11 +0000 (17:05 +0900)] 
check EAP header byte 0, too, and add debug messages

2 years agoadd pre_proxy method which catches invalid EAP packets.
Alan T. DeKok [Wed, 29 Mar 2023 07:53:11 +0000 (16:53 +0900)] 
add pre_proxy method which catches invalid EAP packets.

Because "._udp.local" is not a valid EAP message

2 years agoinitialize sock better, and mark sockets as dead more often
Alan T. DeKok [Wed, 29 Mar 2023 00:28:56 +0000 (09:28 +0900)] 
initialize sock better, and mark sockets as dead more often

2 years agoFix pthread.h include (#4943)
Jorge Pereira [Tue, 28 Mar 2023 17:01:34 +0000 (14:01 -0300)] 
Fix pthread.h include (#4943)

It needs to avoid:

src/lib/event.c:127:2: error: call to undeclared function 'pthread_mutex_destroy'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
CC src/lib/getaddrinfo.c
        pthread_mutex_destroy(&el->mutex);
        ^
src/lib/event.c:162:9: error: call to undeclared function 'pthread_mutex_init'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
        pthread_mutex_init(&el->mutex, NULL);
        ^
src/lib/event.c:478:2: error: call to undeclared function 'pthread_mutex_lock'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
        pthread_mutex_lock(&el->mutex);
        ^

2 years agoMore move @.. to ${Q}... (#4937)
Jorge Pereira [Mon, 27 Mar 2023 21:45:25 +0000 (18:45 -0300)] 
More move @.. to ${Q}... (#4937)

That way we can set Q=@ for quiet, or Q="" for verbose.

2 years agoCI: use local copies of Docker images
Matthew Newton [Thu, 23 Mar 2023 16:25:38 +0000 (16:25 +0000)] 
CI: use local copies of Docker images

2 years ago$(Q) -> ${Q}
Alan T. DeKok [Thu, 23 Mar 2023 17:23:57 +0000 (13:23 -0400)] 
$(Q) -> ${Q}

2 years agoCI: remove ubuntu 18.04
Matthew Newton [Thu, 23 Mar 2023 14:38:29 +0000 (14:38 +0000)] 
CI: remove ubuntu 18.04

2 years agoCI: remove non-Docker path
Matthew Newton [Thu, 23 Mar 2023 14:34:30 +0000 (14:34 +0000)] 
CI: remove non-Docker path

2 years agoci: Add 'sanitizer' build action
Jorge Pereira [Thu, 16 Mar 2023 19:59:08 +0000 (16:59 -0300)] 
ci: Add 'sanitizer' build action