Commit Graph

4291 Commits

Author SHA1 Message Date
Michael Tremer
c4fc6eb017 nqptp: New package
This is a PTP clock synchronisation daemon.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-08-10 10:44:31 +00:00
Peter Müller
4865b7f6b8 Revert "Revert "kernel: update to 5.15.59""
This reverts commit f25f1b55af.
2022-08-08 13:17:30 +00:00
Michael Tremer
06cb5c1bb7 installer: Increase size of /boot to 256 MiB
On some installations, we are running out of space on the /boot
partition due to growing sizes of the ramdisk and the kernel.

To accomodate for that and have room to grow in the future, we increase
the size of the partition to 256 MiB.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-08-08 10:12:43 +00:00
Peter Müller
30f0ea198d zlib: Incorporate fix for CVE-2022-37434
https://www.cve.org/CVERecord?id=CVE-2022-37434

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-08-08 10:11:09 +00:00
Peter Müller
f25f1b55af Revert "kernel: update to 5.15.59"
This reverts commit 43df4a0373.
2022-08-08 10:10:35 +00:00
Arne Fitzenreiter
43df4a0373 kernel: update to 5.15.59
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-08-06 07:45:02 +00:00
Peter Müller
849eeec292 rsync: Patch CVE-2022-29154
https://www.openwall.com/lists/oss-security/2022/08/02/1

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-08-06 06:45:39 +00:00
Peter Müller
7ee41667d0 Bash: Update to 5.1.16
This is a maintenance release that bundles all the previously added
patches, which have therefore been deleted.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-08-03 10:56:22 +00:00
Robin Roevens
2be67e3841 pakfire: Add getmetadata function
- Added new getmetadata function for easy access to all available
  metadata of a pak without knowledge about or need to parse
  pakfire internal db files.
- Added new 'pakfire info' functionality for displaying all available
  metadata of (a) pak(s) to the user, using the new getmetadata.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
074b509724 pakfire: Refactor status seperating UI and logic
- Removed UI code from status function now returning hash with status
  properties.
- Removed function coreupdate_available as it is now not used anymore
- Added UI code to pakfire status routine
- Added meaningfull exitcode to status:
  - 2: Core update available
  - 3: Pak update available
  - 4: Reboot required
  - Error codes can be added together: 2+3 = 5 means both core update
    and pak update is available

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
2b921b796d pakfire: Add list upgrade functionality
- Added possibility to list available upgrades from commandline
  using 'pakfire list upgrade'.
- Added exitcode to 'pakfire list'
- Moved 'Pakfire has finished' log message inside END block to
  always log when pakfire exited.
- Fix: allow [options] between 'list' and [installed/notinstalled/
  upgrade] parameters (Partly fixes Bug #12868)

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
5e1dbc95f7 pakfire: Optimize upgradecore function
upgradecore function should just upgrade the core:
Moved check if upgrade is necessary to pakfire upgrade code, removing
code from upgradecore function duplicating codedbinfo workings.
Also adding more vebosity to pakfire upgrade.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
c6d055a85b pakfire: Replace dbgetlist duplicate code
Replace dbgetlist code duplicating dblist and getmetafile
workings with call to actual dblist and getmetafile functions.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
4bac9fdd12 pakfire: Replace duplicate code with dblist functioncall
Replace pakfire install code duplicating dblist working with call
to actual dblist function.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Robin Roevens
0bd5b13195 pakfire: Refactor dblist seperating UI and logic
- Removed UI code from dblist function and refactor it making it return
  a hash representing the pak db for easier handling of this data.
- Moved core update check in dblist to new seperate dbcoreinfo function
  making it return a hash with current and possibly available core
  version info.
- Update existing calls to dblist
- Bring UI parts previously in dblist to pakfire program itself,
  pakfire.cgi and index.cgi with a few small enhancements:
  - Translations for 'Core-Update', 'Release', 'Update' and 'Version'
  - Add currently installed version numbers to installed paks list in
    pakfire.cgi
  - Add 'Installed: yes/no' to pakfire list output so people not using
    colors have this information too. (Partly fixes Bug #12868)
  - Add update available details to pakfire list output if package has
    updates available.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-28 13:44:29 +00:00
Peter Müller
e404dab5e4 installer: Harden mount options of /boot partition
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-28 13:34:07 +00:00
Michael Tremer
fdf630e8d4 cups-pdf: New package
This package provides a CUPS backend to print into PDF files.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-07-27 07:09:30 +00:00
Leo-Andres Hofmann
950d00b2c2 pakfire/functions.pl: Adjust log level
The informative pakfire message
"No new upgrades available. You are on release ..."
does not mean that an error has happened. This patch adjusts
the log level prefix to "info" accordingly.

Reported-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-07-19 07:50:06 +00:00
Peter Müller
35e8a57e34 krb5: Update to 1.20
Please refer to https://web.mit.edu/kerberos/krb5-1.20/ for the release
notes of this version. No rootfile changes were necessary.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-07-19 07:49:14 +00:00
Matthias Fischer
b7f887e3b1 suricata: Update to 5.0.10
Changelog:

"5.0.10 -- 2022-07-12

Bug #5429: TCP flow that retransmits the SYN with a newer TSval not properly tracked (5.0.x backport)
[Note: Therefore 'suricata-5.0-stream-tcp-Handle-retransmitted-SYN-with-TSval.patch' could be removed]

Bug #5424: inspection of smb traffic without smb/dcerpc doesn't work correct.  (5.0.x backport)
Bug #5423: DCERPC protocol detection when nested in SMB (5.0.x backport)
Bug #5404: detect: will still inspect packets of a "dropped" flow for non-TCP (5.0.x backport)
Bug #5388: detect/threshold: offline time handling issue (5.0.x backports)
Bug #5358: test failure on Ubuntu 22.04 with GCC 12 (5.0.x backport)
Bug #5354: detect/alert: fix segvfault when incrementing discarded alerts if alert-queue-expand fails (5.0.x backport)
Bug #5345: CIDR prefix calculation fails on big endian archs (5.0.x backport)
Bug #5343: ftp: quadratic complexity for tx iterator with linked list (5.0.x backport)
Bug #5341: decode/mime: base64 decoding for data with spaces is broken (5.0.x backport)
Bug #5339: PreProcessCommands does not handle all the edge cases (5.0.x backport)
Bug #5325: FTP: expectation created in wrong direction (5.0.x backport)
Bug #5305: cppcheck: various static analyzer "warning"s
Bug #5302: Failed assert DeStateSearchState
Bug #5301: eve: payload field randomly missing even if the packet field is present
Bug #5289: Remove unneeded stack-on-signal initialization.
Bug #5283: 5.0.x: ftp: don't let first incomplete segment be over maximum length
Bug #5124: alerts: 5.0.8/6.0.4 count noalert sigs towards built-in alert limit (5.0.x backport)
Bug #5113: Off-by-one in flow-manager flow_hash row allocation
Bug #5055: Documentation copyright years are invalid
Bug #5021: dataset: error with space in rule language
Bug #4926: Rule error in SMB dce_iface and dce_opnum keywords (5.0.x backport)
Bug #4646: TCP reassembly, failed assert app_progress > last_ack_abs, both sides need to be pruned
Optimization #5123: alerts: use alert queing in DetectEngineThreadCtx (5.0.x backport)
Optimization #5121: Use configurable or more dynamic @ PACKET_ALERT_MAX@ (5.0.x backport)
Task #5322: stats/alert: log out to stats alerts that have been discarded from packet queue (5.0.x backport)"

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-07-14 09:42:28 +00:00
Adolf Belka
be4bd649f1 vim: Update to version 9.0
- Update from version 8.2 to 9.0
- Update of rootfile
- Remove gcc10 detection patch as this is now built into the source tarball
- Update hardening crash patch. The issue related to the gcc10 patch seems to suggest
   that when that is fixed then the hardening crash patch is not required but it wasn't
   100% clear. So I have left the patch in place as it only changes one line and if it
   worked with the earlier versions then it should also work now. If it is decided that
   it is not needed then it can always be removed at a future update.
- Changelog is massive with over 30000 lines.
   vim provides fixed updates such as 8.2 and 9.0 but then issues very frequent patch
   updates. For version 8.2 there are 5172 patch updates none of which have been applied
   to IPFire. All of these are now built into version 9.0
   https://vimhelp.org/version9.txt.html#new-9 provides the details of what is new with
   version 9.0, including details of all the 5172 patches.
- Key thing for version 9.0 is that there is a new Vim9 script language which is not
   backwards compatible. However the old legacy script language will continue to be
   supported so all old scripts can continue to be used.
- Version 9.0 already has 48 patches released. The releases occur virtually every day
   with several days having multiple patch releases.
- Once this 9.0 version of vim has been confirmed to work successfully by people
   experienced in using vim (I struggle to remember the set of characters to press to
   exit from an editing session), then my plan is to periodically submit an update of the
   patches, although some may be missed out as they are not relevant for IPFire - such
   as deleting Travis CI config and improving the recognition of some Visual Basic files.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-11 13:04:05 +00:00
Peter Müller
d574941b90 Merge branch 'temp-stevee-ipblocklist-final' into next 2022-07-10 08:20:15 +00:00
Peter Müller
ac7f3c75aa Fireinfo: Amend upstream patches for fixing #12896
https://bugzilla.ipfire.org/show_bug.cgi?id=12896#c16

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-09 09:17:29 +00:00
Stefan Schantl
404b513794 ipblocklist: Add "v4" as extension to the ipset set names.
This easily allows us to swap the sets after updating, without
unloading them.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:27:14 +02:00
Stefan Schantl
82fea6d575 update-ipblocklists: Do not log the pid in syslog.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
733267f35a firewall: Add ipblocklist related chains.
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
ac8e283eb4 update-ipblocklist: Add code to reload updated blocklists.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Stefan Schantl
ec1878771a ipblocklist-update: Introduce script to automatically update blacklists.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:13 +02:00
Michael Tremer
72696db892 aliases: Don't call arpping to announce new IP addresses
I am not sure what the rationale is here, but we should probably not do
this. Other hosts on the network will be able to update their ARP caches
properly.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 10:01:50 +00:00
Michael Tremer
6395bed8a4 aliases: Add support to assign aliases to multiple RED interfaces
This is a little patch which will extend the aliases page to offer an
interface selection if there are more than one RED interfaces.

This is a little hack to make configuration easier for users who have
manually set up more than one RED interface (e.g. for load balancing or
fail-over) and want to use the UI to configure firewall rules.

As a little benefit on the side, I had to rewrite setaliases.c to use
ip(8) instead of ifconfig(8).

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 10:01:50 +00:00
Robin Roevens
1898c66a48 zabbix_agentd: By default only listen on GREEN ip
- Change zabbix_agentd.conf during install to only listen on the
  GREEN ip by default.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-06 09:57:40 +00:00
Robin Roevens
092330b128 zabbix_agentd: Sudoers file reorganization
- Remove sudoers file 'zabbix' in favour of new IPFire managed
  'zabbix_agentd' and user managed 'zabbix_agentd_user' which is
  included in the backup
- Provide migration of old sudoers file 'zabbix' or 'zabbix.user' to
  new zabbix_agentd_user sudoers file if it was modified by user.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-06 09:57:40 +00:00
Robin Roevens
e2d54d57d4 zabbix_agentd: Configfile reorganization
- Restrict default main config to only the bare minimum options
  and add upstream provided config as example file.
- Remove /etc/zabbix_agentd from backup and instead add only
  zabbix_agentd.conf and subdirs 'scripts' and 'zabbix_agentd.d' to
  the backup.
- Move ipfire managed userparameter_pakfire.conf from
  user managed dir /etc/zabbix_agentd/zabbix_agent.d to
  ipfire managed dir /var/ipfire/zabbix_agentd/userparameters
- Add Include line to existing zabbix_agentd.conf to include
  the new ipfire managed config dir /var/ipfire/zabbix_agentd/...
- Add and include mandatory IPFire specific agent configuration
  which should never be changed by the user.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-06 09:57:40 +00:00
Robin Roevens
1d00837e7e zabbix_agentd: Fix agent modules dir and few minor bugs
- Add agent modules-dir to backup
- Remove original, not used agent modules dir from rootfile
- Create modules-dir during install if it not already exists
- bugfix: Add existence check before creating log-dir, avoiding error
             messages if it already exists from a previous install
- bugfix: add extract_backup_includes to update.sh script to make
              sure backup includes exist when backup is taken.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2022-07-06 09:57:40 +00:00
Michael Tremer
8ac8abb269 stripper: Strip any PIE executables
Fixes: #12894
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-06 09:57:22 +00:00
Peter Müller
f42dc99758 Merge branch 'next' into temp-c170-development 2022-07-06 06:14:54 +00:00
Michael Tremer
255873a5f9 random: Drop busy-loop script
This is no longer required because the kernel will now try to
generate some randomness in an easier way when needed.

This has been added in: b923dd3de0

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-29 20:11:34 +00:00
Peter Müller
5503a18d71 Merge branch 'next' into temp-c170-development
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-27 13:29:18 +00:00
Peter Müller
0664b1720d linux: Amend upstream patch to harden mount points of /dev
This patch, which has been merged into the mainline Linux kernel, but
not yet backported to the 5.15.x tree, precisely addresses our
situation: IPFire does not use systemd, but CONFIG_DEVTMPFS_MOUNT.

The only explanation I have for bug #12889 arising _now_ is that some
component (dracut, maybe) changed its behaviour regarding remounting of
already mounted special file systems. As current dracut won't (re)mount
any file system already found to be mounted, this means that the mount
options decided by the kernel remained untouched for /dev, hence being
weak in terms of options hardening possible.

As CONFIG_DEVTMPFS_SAFE would not show up in "make menuconfig", changes
to kernel configurations have been simulated.

Fixes: #12889
Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-25 22:20:48 +00:00
Robin Roevens
8ce729457d pakfire: Better errorhandling on downloads
- Add true/false return codes to fetchfile, getmetafile and getmirrors
  indicating succes or failure.
- Check on those return codes and fail gracefully with clean
  error message(s) when downloads fail.
- Replace duplicate meta-file fetching code in dbgetlist with
  getmetafile function (fixing possibly missed cariage return
  conversion in meta-files).
- Remove pointless 5 retries to download server-list.db in
  selectmirror as fetchfile already retries 5 times.
2022-06-25 11:15:03 +00:00
Adolf Belka
0eaaa300d8 rust-time: Required for update of python3-cryptography
- lfs and rootfile created
- Patch created to remove requirement for winapi and related windows dependencies

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2022-06-25 11:13:38 +00:00
Adolf Belka
d6626067a7 rust-chrono: Required for update of python3-cryptography
- lfs and rootfile created
- Patch created to remove requirement for winapi and related windows dependencies

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2022-06-25 11:13:37 +00:00
Michael Tremer
49471f05d5 misc-progs: Fix passing argument list
The run() function expects all arguments without the basename of the
program.

This regression was introduced in a609195a26.

Fixes: #12886
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-23 13:21:23 +00:00
Peter Müller
54bd60b67b Explicitly harden mount options of sensitive file systems
These were found to got lost after upgrading to Core Update 169, so we
set them explicitly to avoid accidential security downgrades.

https://lists.ipfire.org/pipermail/development/2022-June/013714.html

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-22 12:23:10 +00:00
Jon Murphy
2234e8aaca Ship NTP changes
- Device time more accurate.  (e.g., +/- 10 seconds per day to < 100 ms on some devices)
   ( I know we don't need the perfect time server )
 - NTP and time will be accurate in manual mode (setting on Time Server > NTP Configuration WebGUI)
 - Change NTP "prefer" server:
    - The current preferred NTP server in an Undisciplined Local Clock.
    - This is intended when no outside source of synchronized time is available.
    - Change the "prefer" server from 127.127.1.0 to the Primary NTP server specified on
      the Time Server > NTP Configuration WebGUI page.
 - Change allows the drift file (located at /etc/ntp/drift) to be populated by ntpd.
    - The drift file is updated about once per hour which helps correct the device time.

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
2022-06-20 20:43:34 +00:00
Peter Müller
1452738c2e Tor: Update to 0.4.7.8
Changes in version 0.4.7.8 - 2022-06-17
  This version fixes several bugfixes including a High severity security issue
  categorized as a Denial of Service. Everyone running an earlier version
  should upgrade to this version.

  o Major bugfixes (congestion control, TROVE-2022-001):
    - Fix a scenario where RTT estimation can become wedged, seriously
      degrading congestion control performance on all circuits. This
      impacts clients, onion services, and relays, and can be triggered
      remotely by a malicious endpoint. Tracked as CVE-2022-33903. Fixes
      bug 40626; bugfix on 0.4.7.5-alpha.

  o Minor features (fallbackdir):
    - Regenerate fallback directories generated on June 17, 2022.

  o Minor features (geoip data):
    - Update the geoip files to match the IPFire Location Database, as
      retrieved on 2022/06/17.

  o Minor bugfixes (linux seccomp2 sandbox):
    - Allow the rseq system call in the sandbox. This solves a crash
      issue with glibc 2.35 on Linux. Patch from pmu-ipf. Fixes bug
      40601; bugfix on 0.3.5.11.

  o Minor bugfixes (logging):
    - Demote a harmless warn log message about finding a second hop to
      from warn level to info level, if we do not have enough
      descriptors yet. Leave it at notice level for other cases. Fixes
      bug 40603; bugfix on 0.4.7.1-alpha.
    - Demote a notice log message about "Unexpected path length" to info
      level. These cases seem to happen arbitrarily, and we likely will
      never find all of them before the switch to arti. Fixes bug 40612;
      bugfix on 0.4.7.5-alpha.

  o Minor bugfixes (relay, logging):
    - Demote a harmless XOFF log message to from notice level to info
      level. Fixes bug 40620; bugfix on 0.4.7.5-alpha.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
2022-06-19 12:18:17 +00:00
Michael Tremer
a609195a26 misc-progs: Add path to executable to argv
Otherwise, the first argument would always be swollowed :(

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-17 16:39:12 +00:00
Michael Tremer
339b84d509 openvpn-2fa: Import a prototype of an authenticator
This script runs aside of OpenVPN and connects to the management socket.
On the socket, OpenVPN will post any new clients trying to authenticate
which will be handled by the authenticator.

If a client has 2FA enabled, it will be challanged for the current token
which will then be checked in a second pass.

Clients which do not have 2FA enabled will just be authenticated no
matter what and tls-verify will have handled the rest.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Peter Müller
cf7f5004ac localnet: Add "edns0" to /etc/resolv.conf options for RFC 2671 support
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-13 15:47:34 +00:00
Peter Müller
db8639bbfa linux: Update to 5.15.46
Please refer to https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.46
for the changelog of this version.

Due to operational constraints, ARM rootfile changes are simulated.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-13 15:38:42 +00:00