1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 15:34:47 +02:00
Commit Graph

452 Commits

Author SHA1 Message Date
Bram Matthys 3571c9e75b Create BASEDIR with 0700. Just like we already did for almost all subdirs.
Only for ~/unrealircd/lib/ we had this ommision, and for ~/unrealircd itself.
I doubt this means a change for users, as all subdirs were already 0700
so then tightening of ~/unrealircd is not very important.
And only upsides... making things safer..
2026-06-05 17:24:25 +02:00
Bram Matthys 5e8a859102 Bump version and add placeholder empty release notes 2026-05-17 10:52:29 +02:00
Bram Matthys 1250b7f014 ** UnrealIRCd 6.2.5 ** 2026-05-15 13:35:12 +02:00
Bram Matthys 99f1f6a047 Update libsodium to 1.0.22. They may have fixed that arm64 compile issue ;)
We previously upgraded to 1.0.21 and then downgraded to 1.0.20.

Benefit of 1.0.22 is that they also claim to have fixed a warning flood
i am getting with clang 22.
2026-05-02 19:15:07 +02:00
Bram Matthys 17f78de265 Bump version to 6.2.5-git 2026-05-01 19:47:03 +02:00
Bram Matthys abbbcd16a9 ** UnrealIRCd 6.2.4 ** 2026-04-17 06:13:38 +02:00
Bram Matthys 778cf4de82 ** UnrealIRCd 6.2.4-rc1 ** 2026-04-04 08:00:48 +02:00
Bram Matthys 7aa1157474 Downgrade libsodium to 1.0.20 to fix arm64 compile issue
Version 1.0.21 which we shipped with 6.2.3 has this bug, reported
by PhotoJim at https://bugs.unrealircd.org/view.php?id=6615.

And yes, libsodium also has this weird -stable thing, which does
have the fix, but that's basically just a snapshot of their git
version, it's a .tar.gz that gets updated every X time and it does
not have a GPG signature, while I have the policy nowadays to
verify GPG signatures for libraries we ship. So I am option to just
downgrade a version, for now, which is fine since we shipped with
1.0.20 for quite some time until recently.
2026-04-04 06:51:41 +02:00
Bram Matthys ba3fa1d7b6 Update GeoIP question in ./Config and use some magic to support both
geoip_classic and geoip_mmdb in modules.default.conf with Conditional
Config, a dynamic loadmodule line, and auto-updates.

Somewhere in a later version, probably 6.2.5, we will default to mmdb
for all cases.
2026-03-22 17:52:57 +01:00
Bram Matthys 69c9130da1 Bump version to 6.2.4-git 2026-03-22 13:45:28 +01:00
Bram Matthys 172ace9750 geoip_maxmind: use our own mmdb implementation
This is mainly due to licensing. The libmaxminddb library uses the
Apache license, which meant if we would compile it in by default it
would effectively transform our "GPLv2 or later" to "GPLv3 or later".
Our implementation is ISC licensed, so we can include and enable it
by default and keep things at "GPLv2 or later". This is also why we
used geoip_classic in the first place as default and compiled in,
and not the mmdb variant.

The mmdb.c is based on the specification, using the Go implementation
as a reference during development (ISC licensed), initially implemented
with the help of Claude Opus 4.6. After that substantial changes were
made to make it match UnrealIRCd's style and to make things less error
prone: C style changes, allocation and zero termination of strings in
the library, auto-NULL in variadic functions so the caller cannot
forget NULL there (similar to our unreal_log/do_unreal_log), using
enums as the return type instead of int (similar to curl), adding
doxygen docs, etc.

This also means the old mmdb library dependency has been dropped,
including from configure/autoconf.

At the moment we still use the geoip classic library by default,
including those DB files. The idea is we will switch over sometime
later after this current new MMDB stuff has received more testing.

This also makes us more flexible, since .mmdb files have become the
de-facto standard for pretty much all geoip vendors.
2026-03-22 12:10:18 +01:00
Bram Matthys 2d145b0f2c ** UnrealIRCd 6.2.3 ** 2026-03-06 08:23:30 +01:00
Bram Matthys e1211adb3b Restore LDFLAGS after setting it in library compiles
But is this enough...?
2026-03-04 10:49:20 +01:00
Bram Matthys bd1ccde9c3 ** UnrealIRCd 6.2.3-rc2 ** 2026-02-25 08:28:20 +01:00
Bram Matthys a6cdd4b548 Use the exact same approach for argon2 as the other libs
(fixes build)
2026-02-23 08:04:31 +01:00
Bram Matthys 3e9ce77dc6 Hardening: build the last 2 remaining libs with hardening flags too
Library argon2 uses a makefile without configure, so works a bit different
And GeoIP i forgot because it was in a different autoconf file.
2026-02-23 07:17:02 +01:00
Bram Matthys 4c01372e3b Move orig_cflags="$CFLAGS" to after AC_PROG_CC_C99
As otherwise the shipped libs don't (necessarily) get -O2 -g,
which in turn means _FORTIFY_SOURCE=3 won't work.
2026-02-22 20:15:33 +01:00
Bram Matthys ae245865ea Pass hardening flags to libraries that we build/ship ourselves (if any)
Previously we didn't and that means that if any shipped lib was used,
without hardening, this would cause non-CET libraries to silently disable
CET for the entire process, and partial RELRO on the libs means the
full RELRO in UnrealIRCd is much less useful.

Actually, system libs on Debian/Ubuntu don't even have full RELRO atm,
but hey, we try to do better, also.. some other OS/distro might
have it on and who knows Debian/Ubuntu change their mind later..
2026-02-22 19:50:46 +01:00
Bram Matthys dcd8f738fe Remove -fzero-call-used-regs=used-gpr again. This is apparently not
as useful as initially thought. I thought kernel hardening checker
was in favor of it, and they were, but they dropped it in Oct 2023.

(i added it 2-3hrs ago in 0ab1221a38)
2026-02-22 19:02:31 +01:00
Bram Matthys 5cc59192bc Hardening: add -mbranch-protection=standard for arm64 that support it.
e.g. raspberry pi 5, aws ec2 graviton2 and higher, etc.

This does the same as -fcf-protection on x64 (well, those that support it).
2026-02-22 18:29:17 +01:00
Bram Matthys 4d4a43984c Hardening: add -ftrivial-auto-var-init=zero
This zeroes out variables that COULD be accessed before being set
(so to prevent access to unitialized variables). We are generally
very careful about this in our code, but in 3rd party modules this
is less the case. And still useful in case we ourselves screw up.
2026-02-22 16:38:55 +01:00
Bram Matthys 0ab1221a38 Hardening: add -fzero-call-used-regs=used-gpr
Is defense in depth to make ROP harder. In general this is reported to
have a performance impact of 2% worst-case. Linux kernel reports 1%.
Should be closer to 0% for us, or that 1% if i am wrong.
https://lwn.net/Articles/870045/ has some background on this.
2026-02-22 16:33:38 +01:00
Bram Matthys d668c4b78b Hardening: add -fstrict-flex-arrays=3
This should help gcc/clang with finding more OOB write bugs.

It does mean that 3rd party modules can no longer use the something like:
struct { char name[1]; }
and then alloc(sizeof(struct) + length of name)

instead the struct element needs to be name[];
...and they would need to alloc(sizeof(struct) + length of name + 1)

No 3rd party modules in unrealircd-contrib use this so.. hopefully fine.
2026-02-22 16:26:57 +01:00
Bram Matthys fb0649f14a Use full RELRO for modules (use HARDEN_LDFLAGS in MODULEFLAGS)
Previously, due to HARDEN_LDFLAGS missing in MODULEFLAGS we were
only partial RELRO instead of full RELRO. This is a defense-in-
depth measure but is good to have and the ommission was unintended.
2026-02-22 15:37:45 +01:00
Bram Matthys bb4d1b528f ** UnrealIRCd 6.2.2-rc1 **
(Actually the Windows build is still building :D)
2026-01-31 09:44:57 +01:00
Bram Matthys 6083c039cd Update shipped libs: PCRE2 (10.47), Jansson (2.15.0), Sodium (1.0.21) 2026-01-30 12:58:12 +01:00
Bram Matthys de05bb9654 Bump version to 6.2.3-git and write some early release notes 2026-01-04 10:20:46 +01:00
Bram Matthys 806fa83dd7 ** UnrealIRCd 6.2.2 ** 2025-12-12 12:16:31 +01:00
Bram Matthys 94d4ded864 Update c-ares to 1.34.6 and update release notes. 2025-12-12 10:13:49 +01:00
Bram Matthys d7a6868950 Bump version to 6.2.2-git 2025-11-09 09:01:34 +01:00
Bram Matthys 4e0eaecb33 Run ./configure for PCRE2 also with original CFLAGS
(and not with the ones we add during ./Config like -Wall -Wextra etc...)

Seen while debugging some other problem
2025-11-07 18:39:40 +01:00
Bram Matthys 09032ec868 ** UnrealIRCd 6.2.1 ** 2025-11-02 16:10:26 +01:00
Bram Matthys 58c37b67f9 ** UnrealIRCd 6.2.1-rc2 ** 2025-10-23 18:02:43 +02:00
Bram Matthys f5a5dae4aa Make sanitizer question in ./Config not only enable ASan but also UBSan
(both AddressSanitizer and UndefinedBehaviorSanitizer)

This previously helped finding 8c26cec5fc

Also update the ./Config text a bit, eg about ASan not running OK on FreeBSD,
which only affects <14.2 as per https://bugs.unrealircd.org/view.php?id=6470#c23412
2025-10-17 09:27:43 +02:00
Bram Matthys 15e367a822 ** UnrealIRCd 6.2.1-rc1 ** 2025-10-12 15:10:32 +02:00
Bram Matthys 507061af46 Add tls-options::signature-algorithms for those who want to override the default.
We don't set it in UnrealIRCd at the moment, so this is just to override
the OpenSSL defaults at the moment. It is good to have this exposed, in
case some vulnerability is discovered or you need some flexibility in
tweaking this.
2025-09-21 13:55:24 +02:00
Bram Matthys 2798276316 add -Wno-unterminated-string-initialization
Without this on some new compilers this raises a warning (or error with -Werror):
const char hexchars[16] = "0123456789abcdef";

The alternative is to add __attribute__((nonstring)) at the various places
that need it. But 1) that requires various ifdefs to support old compilers, and
2) This doesn't catch anything meaningful in our code anyway and the odds of
it doing so seem slim.
2025-09-15 07:47:44 +02:00
Bram Matthys 13217cc6ff Bump version to 6.2.1-git 2025-09-14 14:57:43 +02:00
Bram Matthys 9042dd21c0 ** UnrealIRCd 6.2.0.2 ** 2025-09-14 14:21:47 +02:00
Bram Matthys 4cc51af280 ** UnrealIRCd 6.2.0.1 **
This version (only) fixes some incorrect "best practices" warnings
2025-09-12 07:55:33 +02:00
Bram Matthys bc27eb48fb ** UnrealIRCd 6.2.0 ** 2025-09-09 18:10:49 +02:00
Bram Matthys aa8a8ee135 ** UnrealIRCd 6.2.0-beta3 **
This one will also be announced on the mailing list (beta1 and beta2 were not)
2025-08-01 11:28:37 +02:00
Bram Matthys 6178e2b94f *** UnrealIRCd 6.2.0-beta2 *** 2025-07-25 10:31:44 +02:00
Bram Matthys d146da4a07 Change the cipherinfo, such as in [secure: TLSv1.3...] and in WHOIS.
Previously this was like:
TLSv1.3-TLS_CHACHA20_POLY1305_SHA256
It is now changed to be like:
TLSv1.3/X25519/TLS_CHACHA20_POLY1305_SHA256

So:
* Changed from '-' to '/' because sometimes the cipher(suite)
  contains a hyphen (TLSv1.2 and earlier)
* Show the key exchange "group" in the middle, such as X25519
  for the usual non-PQC case and X25519MLKEM768 for hybrid group
  with PQC.
* The group is shown in OpenSSL 3.0.0+ (and obviously you need
  OpenSSL 3.5.0 to ever see X25519MLKEM768 there, but that is
  something different)
2025-07-24 15:32:00 +02:00
Bram Matthys 0729382ba2 Rename ::ecdh-curves to groups and add X25519MLKEM768 to group list.
Post-quantum cryptography (PQC). Release notes will follow later.
2025-07-24 14:47:49 +02:00
Bram Matthys e8b5a831e1 ** UnrealIRCd 6.2.0-beta1 **
(Possibly some Windows build fixes after this, but..)
2025-07-13 11:39:00 +02:00
Bram Matthys b04c402ce0 Update shipped Jansson to 2.14.1. 2025-04-16 14:18:10 +02:00
Bram Matthys a6d9288a77 Update shipped PCRE2 to 10.45. 2025-04-16 14:16:51 +02:00
Bram Matthys 85b9b4ddc1 Update shipped c-ares to 1.34.5 (8-apr-2025) 2025-04-16 14:00:55 +02:00
Bram Matthys 5d733d50e5 Bump version to 6.2.0-git 2025-03-21 15:31:44 +01:00