Matthew Newton [Mon, 12 Jun 2023 13:02:57 +0000 (14:02 +0100)]
docker/crossbuild: backport Dockerfile updates from 3.2
commits:
9806381bd3 docker: remove duplicate lines 13091819c3 docker: remove obsolete OSes d35586d463 generate dockerfiles from m4 templates ac339f4731 docker: add debian 12 bookworm 2a89b55398 docker: add rocky9 37db20c784 crossbuild: remove centos8 dc67a0492c crossbuild: generate Dockerfiles from m4 templates 707e0eb90a crossbuild: add recent OSes e4bccf5ef7 crossbuild: update docs 80670757cc crossbuild: don't set rpm BUILDDIR e88c86b25b crossbuild: newer systems disable TLS1.1 but we need it for testing deb77d22b0 CI: add job to check all crossbuild docker images work 720709d0b4 docker: use similar m4 template system as for crossbuild
Alan T. DeKok [Tue, 6 Jun 2023 06:11:22 +0000 (08:11 +0200)]
mark "inst" as unused, and relax checks a bit more
for now, we will only check if the EAP message length is correct.
This prevents "middle box" effect, where the protocol cannot be
upgraded, because middle boxes aren't upgraded.
There is a near-zero chance that EAP will be updated to allow
supplicants to send something other than 1 (Response). But for
general protocol correctness and paranoia, let's allow for that
Jorge Pereira [Thu, 9 Mar 2023 19:05:52 +0000 (16:05 -0300)]
Fix runtime LSAN/ASAN error in src/lib/atomic_queue.c
Such error:
runtime error: member access within misaligned address 0x7f0e163fe860
for type 'fr_atomic_queue_t' (aka 'struct fr_atomic_queue_t'),
which requires 128 byte alignment 0x7f0e163fe860: note: pointer points here)
In that case, it was necessary backport talloc_aligned_array()
Jorge Pereira [Thu, 23 Mar 2023 00:10:20 +0000 (21:10 -0300)]
Fix runtime LSAN/ASAN error in command.c
Such error:
src/main/command.c:185:12: runtime error: member access within null
pointer of type 'struct sockaddr_un'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior
src/main/command.c:185:12 in
Jorge Pereira [Tue, 14 Mar 2023 21:36:01 +0000 (18:36 -0300)]
Fix heap-buffer-overflow in pap_auth_pbkdf2_parse()
==3061536==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6100000053f9 at pc 0x7f3eb4ff6bbe bp 0x7fff630b7770 sp 0x7fff630b7768
READ of size 1 at 0x6100000053f9 thread T0
#0 0x7f3eb4ff6bbd in strlcpy /home/jpereira/Devel/FreeRADIUS/freeradius-server-v3.2.x.git-linux/src/lib/strlcpy.c:56:10
Jorge Pereira [Thu, 16 Mar 2023 16:12:43 +0000 (13:12 -0300)]
Fix memory leak in client_add()
Such error when we run: radiusd -CX
Configuration appears to be OK
Allocated memory at time of report:
Current state of talloced memory:
full talloc report on 'null_context' (total 1057 bytes in 4 blocks)
autofree_context contains 1 bytes in 2 blocks (ref 0) 0x608000000400
bool contains 1 bytes in 1 blocks (ref 0) 0x60b000044a90
RADCLIENT_LIST contains 1056 bytes in 1 blocks (ref 0) 0x6190000032e0
Direct leak of 96 byte(s) in 1 object(s) allocated from:
#0 0x5598fcd87f3e in malloc (/home/jpereira/Devel/FreeRADIUS/freeradius-server-v3.2.x.git-linux/build/bin/local/radiusd+0x20cf3e) (BuildId: 3bf5bfb4fd72e1e1112726414556f8a4f339789f)
#1 0x7f1cc4453d7f in __talloc_with_prefix /build/talloc-NvEq5A/talloc-2.3.3/bin/default/../../talloc.c:783:9
#2 0x7f1cc4455a5d in __talloc /build/talloc-NvEq5A/talloc-2.3.3/bin/default/../../talloc.c:825:9
#3 0x7f1cc4455a5d in _talloc_named_const /build/talloc-NvEq5A/talloc-2.3.3/bin/default/../../talloc.c:982:8
#4 0x7f1cc4455a5d in talloc_enable_null_tracking /build/talloc-NvEq5A/talloc-2.3.3/bin/default/../../talloc.c:2353:18
#5 0x7f1cc4455a5d in talloc_enable_null_tracking /build/talloc-NvEq5A/talloc-2.3.3/bin/default/../../talloc.c:2350:15
#6 0x5598fceb65b1 in main /home/jpereira/Devel/FreeRADIUS/freeradius-server-v3.2.x.git-linux/src/main/radiusd.c:313:3
#7 0x7f1cc342350f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#8 0x7f1cc34235c8 in __libc_start_main csu/../csu/libc-start.c:381:3
#9 0x5598fcd02514 in _start (/home/jpereira/Devel/FreeRADIUS/freeradius-server-v3.2.x.git-linux/build/bin/local/radiusd+0x187514) (BuildId: 3bf5bfb4fd72e1e1112726414556f8a4f339789f)
SUMMARY: AddressSanitizer: 96 byte(s) leaked in 1 allocation(s).
Alan T. DeKok [Fri, 17 Mar 2023 13:40:19 +0000 (09:40 -0400)]
disallow CoA for fake packets. Fixes #4929
The CoA handling in process.c requires that the CoA packet be
associated with a "real" request. i.e. one that was received from
the network, and is therefore long-lived.
"fake" packets, such as ones sent to a virtual home server, or
packets used in the "inner-tunnel" virtual server can't do CoA.
This is because the fake packets are freed immediately after they
are processed, and there is no way for them to push the CoA child
into the main event loop.
Jorge Pereira [Tue, 14 Mar 2023 19:09:56 +0000 (16:09 -0300)]
Fix runtime error in file_common()
Such error:
src/modules/rlm_files/rlm_files.c:431:49: runtime error: null pointer passed as argument 3, which is declared to never be null
src/freeradius-devel/radiusd.h:603:89: note: nonnull attribute specified here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/modules/rlm_files/rlm_files.c:431:49 in
Jorge Pereira [Tue, 14 Mar 2023 19:05:42 +0000 (16:05 -0300)]
Fix runtime error in cf_file_open()
Such error:
src/main/conffile.c:333:22: runtime error: load of value 190, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/main/conffile.c:333:22 in