]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
James Jones [Wed, 21 Sep 2022 13:52:43 +0000 (08:52 -0500)]
Check inst->filename before trying to use it (CID #
1503909 ) (#4732)
It appears that all invocations of the open function of an
fr_app_io_t check for error, so this should suffice (apart
from possible error loggign) and should satisfy coverity
without annotation.
James Jones [Wed, 21 Sep 2022 13:51:58 +0000 (08:51 -0500)]
Annotate "tainted data" in fr_udp_header_check() call (CID #
1504049 ) (#4727)
Coverity claims that the "downcast" of a uint8_t const * to
ip_header_t const * taints "the data that this pointer points to".
"this pointer" must be p, because coverity says not a word about
dereferences of ip. The pointed at data isn't changed, being const
qualified. p and the passed length are checked in fr_udp_header_check().
Nick Porter [Thu, 8 Sep 2022 13:16:36 +0000 (14:16 +0100)]
Use dummy LDAP handle to tidy code
Nick Porter [Thu, 8 Sep 2022 13:18:13 +0000 (14:18 +0100)]
Typos
Alan T. DeKok [Tue, 20 Sep 2022 18:10:32 +0000 (14:10 -0400)]
we shouldn't be using a NULL talloc_ctx.
and always free the result_copy, as the debug level may change
in an xlt function
Alan T. DeKok [Tue, 20 Sep 2022 16:51:38 +0000 (12:51 -0400)]
reset request->module only when the module is done
not when it returns. Because if the module asks for an xlat to
be expanded, that is done on behalf of the module. And any xlat
debugging should print the module name
Alan T. DeKok [Tue, 20 Sep 2022 16:11:53 +0000 (12:11 -0400)]
add file / line for indent debugging
and move indent debugging to after the change, so it's clearer
what has been done where.
Alan T. DeKok [Mon, 19 Sep 2022 18:58:24 +0000 (14:58 -0400)]
typo
and reformat to match the use a few lines above, to make future
typos easier to spot
Alan T. DeKok [Mon, 19 Sep 2022 12:46:21 +0000 (08:46 -0400)]
manually ported from v3, with fixes
Alan T. DeKok [Sun, 18 Sep 2022 13:36:38 +0000 (09:36 -0400)]
indent for nested xlat expansion
which makes the debug output rather a lot easier to read
Alan T. DeKok [Sat, 17 Sep 2022 13:27:18 +0000 (09:27 -0400)]
save node->fmt as the name of the attribute we're looking for
we should arguably walk through the xlat after it's been parsed,
and replace node->fmt with the *printed* version of the node.
That way we don't have to resort to run-time walking through the
func+argc, etc. in order to print a name for the xlat we're
resolving.
Alan T. DeKok [Sat, 17 Sep 2022 13:15:55 +0000 (09:15 -0400)]
use _s for structures
Alan T. DeKok [Sat, 17 Sep 2022 13:12:32 +0000 (09:12 -0400)]
add visual bars for xlat expansion
which helps to visually separate them from unlang statements.
And also helps to line up nested xlats
Terry Burton [Mon, 19 Sep 2022 15:43:12 +0000 (16:43 +0100)]
Nokia SR dict: Cleanup and freshen against July 2022 reference (#4729)
Alan T. DeKok [Fri, 16 Sep 2022 15:31:54 +0000 (11:31 -0400)]
move save / restore indent to the correct spots
Alan T. DeKok [Fri, 16 Sep 2022 15:09:39 +0000 (11:09 -0400)]
more cleanups for debug printing
Alan T. DeKok [Fri, 16 Sep 2022 13:44:59 +0000 (09:44 -0400)]
move luajit definitions to one place
and only use the definitions if libfreeradius-lua is built.
Apparently on an Apple M1, adding the various pagesize options
results in an invalid Mach-O executable
Alan T. DeKok [Fri, 16 Sep 2022 01:12:34 +0000 (21:12 -0400)]
add and set "constant" flag for xlat
so that we can suppress printing xlat expansions for XLAT_BOX
and tmpl_t's which are data. It's confusing to see
EXPAND 4
---> 4
Alan T. DeKok [Fri, 16 Sep 2022 00:56:30 +0000 (20:56 -0400)]
assert that there's always a format for the node
Alan T. DeKok [Fri, 16 Sep 2022 00:50:50 +0000 (20:50 -0400)]
tweak debug output, and add indentation
Alan T. DeKok [Fri, 16 Sep 2022 00:50:11 +0000 (20:50 -0400)]
add RINDENT_SAVE / RESTORE
so that we can save indention, and then avoid REXDENT on all
of the error paths.
Alan T. DeKok [Fri, 16 Sep 2022 00:46:53 +0000 (20:46 -0400)]
always set node->fmt
Alan T. DeKok [Fri, 16 Sep 2022 00:00:48 +0000 (20:00 -0400)]
cleanups
Alan T. DeKok [Thu, 15 Sep 2022 20:29:59 +0000 (16:29 -0400)]
more cleanups
we no longer create a tmpl from the RHS result. Instead, we just
leave it as a value-box list, or as a pair list
Alan T. DeKok [Thu, 15 Sep 2022 20:26:23 +0000 (16:26 -0400)]
minor cleanups and lots more comments
Alan T. DeKok [Thu, 15 Sep 2022 18:40:55 +0000 (14:40 -0400)]
final step of edit fixups and tests
Alan T. DeKok [Wed, 14 Sep 2022 20:59:05 +0000 (16:59 -0400)]
typos, and work around merge issue with hex <=
Alan T. DeKok [Wed, 14 Sep 2022 19:59:48 +0000 (15:59 -0400)]
update test until we find time to track down other issues
Alan T. DeKok [Wed, 14 Sep 2022 19:57:47 +0000 (15:57 -0400)]
warnings, so they don't eat the real error
Alan T. DeKok [Wed, 14 Sep 2022 01:50:56 +0000 (21:50 -0400)]
more "rewrite to state functions"
Alan T. DeKok [Fri, 2 Sep 2022 12:33:25 +0000 (08:33 -0400)]
rename for clarity
Alan T. DeKok [Thu, 1 Sep 2022 23:49:37 +0000 (19:49 -0400)]
avoid using lhs.vp where possible
in preparation for making LHS into a cursor
Alan T. DeKok [Thu, 1 Sep 2022 23:14:02 +0000 (19:14 -0400)]
more cleanups to unify and simplify code
Alan T. DeKok [Thu, 1 Sep 2022 22:06:31 +0000 (18:06 -0400)]
allow multiple selectors for leaf attributes
Alan T. DeKok [Thu, 1 Sep 2022 16:09:30 +0000 (12:09 -0400)]
notes so that we don't forget
Alan T. DeKok [Thu, 1 Sep 2022 15:39:16 +0000 (11:39 -0400)]
remove unnecessary code
Alan T. DeKok [Thu, 1 Sep 2022 14:54:16 +0000 (10:54 -0400)]
more cleanups
move expand RHS list to its own function.
Remove in_parent_list as redundant
Alan T. DeKok [Thu, 1 Sep 2022 13:50:15 +0000 (09:50 -0400)]
more cleanups to use only one cursor for the LHS
Alan T. DeKok [Thu, 1 Sep 2022 13:10:02 +0000 (09:10 -0400)]
split up functions some more
Alan T. DeKok [Wed, 31 Aug 2022 21:00:01 +0000 (17:00 -0400)]
more cleanups to edit state functions
Alan T. DeKok [Wed, 31 Aug 2022 20:53:53 +0000 (16:53 -0400)]
more rearrange to state functions
Alan T. DeKok [Wed, 31 Aug 2022 20:26:47 +0000 (16:26 -0400)]
move to function-based approach
in preparation for further breaking down the code into smaller
functions, with less if / then / else logic. And then to move to
using dcursors
Alan T. DeKok [Wed, 14 Sep 2022 02:37:07 +0000 (22:37 -0400)]
%{...} can be T_BARE_WORD
Nick Porter [Wed, 14 Sep 2022 09:04:36 +0000 (10:04 +0100)]
No need to copy back files from FreeBSD VM
Nick Porter [Wed, 14 Sep 2022 08:03:05 +0000 (09:03 +0100)]
Check return of fr_pair_list_copy() (CID #
1514672 and
1514673 )
Alan T. DeKok [Wed, 14 Sep 2022 01:47:13 +0000 (21:47 -0400)]
minor rearrangement
we should check for bad LHS before parsing the RHS
Alan T. DeKok [Fri, 9 Sep 2022 14:22:38 +0000 (10:22 -0400)]
we should use test_fail, not fail for most situations
Alan T. DeKok [Thu, 8 Sep 2022 20:47:15 +0000 (16:47 -0400)]
try to get tmpl_dcursor insert / remove working
commented out because it doesn't work, and there's not yet time
to track it down
Alan T. DeKok [Fri, 9 Sep 2022 12:40:30 +0000 (08:40 -0400)]
print program to run after printing logs
Alan T. DeKok [Thu, 8 Sep 2022 20:47:01 +0000 (16:47 -0400)]
typo
Alan T. DeKok [Wed, 7 Sep 2022 20:26:57 +0000 (16:26 -0400)]
notes on how to quickly find failing tests
Alan T. DeKok [Fri, 2 Sep 2022 20:31:07 +0000 (16:31 -0400)]
fix fr_pair_iter_next_dcursor_value() and friends
Alan T. DeKok [Thu, 1 Sep 2022 22:13:39 +0000 (18:13 -0400)]
more cleanups
perl -p -i -e 's/&request\./&/' src/tests/keywords/*
except for "comments", because &Reply-Message is likely parsed
as &Reply - &Message. We'll have to track that down again
Alan T. DeKok [Thu, 1 Sep 2022 22:10:15 +0000 (18:10 -0400)]
simplification
perl -p -i -e 's/&request.Tmp/&Tmp/' src/tests/keywords/*
Alan T. DeKok [Wed, 31 Aug 2022 13:18:30 +0000 (09:18 -0400)]
update doxygen
Nick Porter [Tue, 13 Sep 2022 13:11:24 +0000 (14:11 +0100)]
Bump FreeBSD vm version
Nick Porter [Tue, 13 Sep 2022 10:54:42 +0000 (11:54 +0100)]
Don't use uninitialized variable
James Jones [Mon, 12 Sep 2022 23:41:47 +0000 (18:41 -0500)]
Annotate false positive uninit_use (CID #
1503898 ) (#4719)
find is uninitialized and only has a small portion of find.addr.inet
set in fr_redis_cluster_pool_by_node_addr(), but then all of find.addr
is assigned to spare->pending_addr, hence coverity complains. It turna
out, though, that cluster_node_connect() only uses the part that did
get set.
James Jones [Mon, 12 Sep 2022 23:41:36 +0000 (18:41 -0500)]
Typo (#4714)
copy/paste strikes again
James Jones [Mon, 12 Sep 2022 23:41:25 +0000 (18:41 -0500)]
Deal with complaints about len parameter of fr_udp_checksum (CIDs below) (#4712)
1504068 ,
1503957 , 150468: use the value l4_len directly so it's not
fed through two byte swaps and hence tainted.
James Jones [Mon, 12 Sep 2022 23:41:09 +0000 (18:41 -0500)]
Annotate xlat uses of known good values from dlsts (CIDs follow) (#4708)
By the time these functions are called, the dlists are known
to have the needed list items.
CIDs:
1506634 ,
1506635 ,
1506636 ,
1506637 ,
1506638 ,
1506639 ,
1506640 ,
1506641 ,
1506642 ,
1506643
James Jones [Mon, 12 Sep 2022 23:40:27 +0000 (18:40 -0500)]
Cast remaining non-checked fr_pair_list_copy() calls to void (CIDs below) (#4682)
CIDs: #
1504051 , #
1507255
James Jones [Mon, 12 Sep 2022 23:39:06 +0000 (18:39 -0500)]
Consistently use bracket, not brace, for annotations (CID #
1448182 ) (#4704)
Typo
James Jones [Mon, 12 Sep 2022 23:35:29 +0000 (18:35 -0500)]
one more sbuff_tests.c annotation (CID #
1504019 ) (#4699)
Missed onefr_sbuff_out_bstrncpy_until() that coverity doesn't
realize will always put *something* in the sbuff
James Jones [Mon, 12 Sep 2022 23:34:47 +0000 (18:34 -0500)]
Annotate false positive tainted_data (CID #
1503893 ) (#4713)
In fr_dhcv4_raw_packet_recv() (is there a reason for that
spelling?), coverity claims the downcast of packet->data
in the fr_dhcpv4_packet_get_option() call taints the contents
of packet->data, but it's cast to, and the called function
takes, a const-qualified pointer, so in what sense can it be
tainted?
James Jones [Mon, 12 Sep 2022 23:34:17 +0000 (18:34 -0500)]
Deal with coverity tainted data defect in mod_track_create() (CID #14… (#4718)
* Deal with coverity tainted data defect in mod_track_create() (CID #
1469134 )
Added a test to make sure option + option_len doesn't extend off
the end of the packet. Since in other cases, coverity doesn't
recognize the range check that it asks for, we annotate it, too.
* Brackets
Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
James Jones [Mon, 12 Sep 2022 23:31:56 +0000 (18:31 -0500)]
move first use after NULL check (CID #
1503920 ) (#4715)
James Jones [Mon, 12 Sep 2022 23:30:52 +0000 (18:30 -0500)]
Check for NULL return from xlat_register() (CID #
1507059 ) (#4721)
Barring issues with args, xlat_func_args() will dereference the
xlat_t * handed it, and xlat_register()'s callers do check for
error return, so it makes sense to check what xlat_register()
returns and return error in that case.
James Jones [Wed, 7 Sep 2022 20:28:44 +0000 (15:28 -0500)]
Annotate false positive uninit (CID #
1503938 , #
1504037 ) (#4716)
Both instances appear in the same printf() call.
1503938 : flags is large enough that fr_dict_attr_flags_print()
will not run out of space, the only way it can return
an error.
1504037 : NULL is passed as the ancestor, and coverity doesn't
complain about evaluating da->type, so it must not
think da is NULL. Given that, the fr_dict_attr_oid_print()
call here also can only fail by running out of room.
oid_str is 512 bytes, but here the length depends on
da->depth. It appears that 512 bytes suffices in practice,
but we'll check the return value and exit after logging
an error if it proves not to.
James Jones [Wed, 7 Sep 2022 20:28:09 +0000 (15:28 -0500)]
Annotate false positive tainted_data (CID #
1243443 ) (#4717)
Coverity doesn't realize that eap_validation(), which is called
before eap_identity(), range checks the length.
Arran Cudbard-Bell [Mon, 5 Sep 2022 20:38:20 +0000 (16:38 -0400)]
Wordsmithing
Arran Cudbard-Bell [Mon, 5 Sep 2022 20:24:18 +0000 (16:24 -0400)]
sbuff-ng
Nick Porter [Mon, 5 Sep 2022 07:26:52 +0000 (08:26 +0100)]
Ensure out is set on all return paths
Arran Cudbard-Bell [Sun, 4 Sep 2022 20:56:24 +0000 (16:56 -0400)]
Use the FR_SBUFF_SET_RETURN macro
Arran Cudbard-Bell [Sun, 4 Sep 2022 20:53:04 +0000 (16:53 -0400)]
Use the FR_SBUFF_RETURN_ERROR macro
Arran Cudbard-Bell [Sun, 4 Sep 2022 20:51:21 +0000 (16:51 -0400)]
Switch the majority of xlat functions and condition functions to returning fr_sbuff_error
Arran Cudbard-Bell [Sun, 4 Sep 2022 04:38:38 +0000 (00:38 -0400)]
Have base* functions return fr_slen_t
Arran Cudbard-Bell [Sun, 4 Sep 2022 04:34:02 +0000 (00:34 -0400)]
Move regex_flag_parse to fr_slen_t
Arran Cudbard-Bell [Sun, 4 Sep 2022 04:19:43 +0000 (00:19 -0400)]
Use fr_sbuff_error in more places
Arran Cudbard-Bell [Sun, 4 Sep 2022 03:28:16 +0000 (23:28 -0400)]
Fix unsafe dereferences of fr_sbuff_current
Add significantly simpler error handling logic
Arran Cudbard-Bell [Sat, 3 Sep 2022 16:17:03 +0000 (12:17 -0400)]
Rework filter parsing
Now prouces fr_slen_t offsets which are increased by one...
Rework is to prep for more complex filters in future...
Arran Cudbard-Bell [Sat, 3 Sep 2022 16:04:58 +0000 (12:04 -0400)]
Fix output format so jump to line works with vscode
Arran Cudbard-Bell [Sat, 3 Sep 2022 15:44:26 +0000 (11:44 -0400)]
Add safe macros for switching over sbuffs
Arran Cudbard-Bell [Sat, 3 Sep 2022 15:10:10 +0000 (11:10 -0400)]
Use accessors for more tmpl fields
Arran Cudbard-Bell [Tue, 30 Aug 2022 22:29:50 +0000 (17:29 -0500)]
Update example site with correct location of session-id for eap_aka_sim
github-actions[bot] [Sat, 3 Sep 2022 09:58:29 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:24 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:22 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:18 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:16 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:13 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:10 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sat, 3 Sep 2022 09:58:06 +0000 (09:58 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
James Jones [Thu, 1 Sep 2022 20:24:56 +0000 (15:24 -0500)]
Annotate false positive tainted_data (CID #
1451665 ) (#4709)
This one is interesting. fr_radius_packet_log_hex(), called
if NDEBUG is defined and the debug level is high enough, in
turn calls fr_nbo_to_uint16() and fr_box_octets(). The results
are used in log messages, Typically when bytes are swapped, the
entity to which the result is stored is considered tainted, but
here coverity thinks the data being read is tainted. That
propagates back to place where the defect is claimed.
Jorge Pereira [Thu, 1 Sep 2022 20:21:46 +0000 (17:21 -0300)]
More convert from 'update {....}' to 'edit' against src/tests/keywords (#4710)
James Jones [Thu, 1 Sep 2022 16:29:43 +0000 (11:29 -0500)]
Annotate false positive tainted_data (CID #
1503921 ) (#4711)
By construction, 0 <= offset <= 0x3fff, so it is in range as
a subscript for fr_dns_marker.
Alan T. DeKok [Wed, 31 Aug 2022 13:06:30 +0000 (09:06 -0400)]
typo
Nick Porter [Tue, 30 Aug 2022 15:48:32 +0000 (16:48 +0100)]
Better way to check test server is defined
Alan T. DeKok [Tue, 30 Aug 2022 20:44:18 +0000 (16:44 -0400)]
only create VPs for := and =
Alan T. DeKok [Tue, 30 Aug 2022 20:37:02 +0000 (16:37 -0400)]
reference the correct tmpl