Commit Graph

4138 Commits

Author SHA1 Message Date
Stefan Schantl
85b1d83b2a update-ids-ruleset: Always drop the lock file if it has been created during runtime.
In some situations or if an error happened, the lock file could be
keep on the system. In such a case the IDS page would be locked forever
until user interaction or reboot of the system.

Now the script checks if it has created such a lock and release it when
the script exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:49:59 +00:00
Arne Fitzenreiter
2ecb278462 unbound: fix dns working check
pool.ipfire.org cannot resolved. Now try both default dns
servers. If one works dns is working.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-19 15:53:14 +00:00
Peter Müller
926d840fae firewall: Make logging of conntrack INVALIDs configureable
In theory, logging of dropped packets classified by conntrack as being
INVALID should never be disabled, since one wants to have a paper trail
of what his/her firewall is doing.

However, conntrack seems to drop a lot of (at the first glance
legitimate) packets, hence bloating the logs, making spotting the
important firewall hits more difficult.

This patch therefore adds the option to disable logging of packets being
dropped by conntrack due to INVALID state.

Please note:
- This patch does not add this category to the firewall hits graph.
- The variables in this patch ("LOGDROPCTINVALID") should make it clear
  that it is about toggling _logging_, not the actual _dropping_. Other
  variables are still in need of being renamed to clarify this, which
  will be done in a dedicated patch.
- Also, the changes made to update.sh need to take place in
  config/rootfiles/core/164/update.sh for "master", since this patch has
  been developed against "next". Kindly cherry-pick the necessary
  changes.

Partially fixes: #12778

Reported-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-19 15:37:16 +00:00
Peter Müller
5c1af49c83 firewall: Add proper logging prefix for conntrack INVALID hits
Fixes: #12778

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-19 08:06:36 +00:00
Matthias Fischer
1217807d09 squid: Update from 5.2 => 5.4.1
For details see:
http://www.squid-cache.org/Versions/v5/changesets/SQUID_5_4_1.html

This is 'squid 5.4.1', containing the previous patch for Bug #5055.

Prior to this patch I reverted my previous patches 'squid: Update 5.2 => 5.4" and
'squid 5.4: Latest patch - Bug #5055 - from upstream' and  marked them as
'superseded' in patchwork.

For a better overview the 'squid-gcc11'-patch has been renamed again and moved
to an own squid-patch-directory.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-16 16:24:03 +00:00
Arne Fitzenreiter
4b94860d07 firewall: Revert strict martian check on loopback interface
If the firewall is talking to itself using one of its private IP
addresses (e.g. the primary green interface IP address), it will use the
loopback interface.

This is due to the local routing table which will be looked up first:

  [root@ipfire ~]# ip rule
  0:      from all lookup local
  128:    from all lookup 220
  220:    from all lookup 220
  32765:  from all lookup static
  32766:  from all lookup main
  32767:  from all lookup default

It contains:

  [root@ipfire ~]# ip route show table local
  local 8x.1x.1x.1x dev ppp0 proto kernel scope host src 8x.1x.1x.1x
  local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
  local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
  broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
  local 192.168.x.1 dev green0 proto kernel scope host src 192.168.x.1
  broadcast 192.168.x.255 dev green0 proto kernel scope link src 192.168.x.1

Any lookup for the green IP address will show this:

  local 192.168.x.1 dev lo table local src 192.168.x.1 uid 0
      cache <local>

A test ping shows this in tcpdump:

  [root@ipfire ~]# tcpdump -i any icmp -nn
  tcpdump: data link type LINUX_SLL2
  tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
  listening on any, link-type LINUX_SLL2 (Linux cooked v2), snapshot length 262144 bytes
  17:24:22.864293 lo    In  IP 127.0.0.1 > 127.0.0.1: ICMP echo request, id 10420, seq 1, length 64
  17:24:22.864422 lo    In  IP 127.0.0.1 > 127.0.0.1: ICMP echo reply, id 10420, seq 1, length 64
  17:24:29.162021 lo    In  IP 192.168.x.1 > 192.168.x.1: ICMP echo request, id 1555, seq 1, length 64
  17:24:29.162201 lo    In  IP 192.168.x.1 > 192.168.x.1: ICMP echo reply, id 1555, seq 1, length 64

For this reason, we will have to accept any source and destination IP
address on the loopback interface, which is what this patch does.

We can however, continue to check whether we received any packets with
the loopback address on any other interface.

This regression was introduced in commit a36cd34e.

Fixes: #12776 - New spoofed or martian filter block
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-14 19:47:37 +00:00
Arne Fitzenreiter
5462658ea0 firewall: fix missing space
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-12 18:06:39 +00:00
Arne Fitzenreiter
5b0eca9528 firewall: initialize IFACE if it is empty
at first boot there is no IFACE set which result in iptables
errors at boot.

fixes #12767

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-12 18:00:09 +00:00
Arne Fitzenreiter
2f3af8c0c4 partresize: fix/add more NanoPi R* whitspaces
this fix MAC address generation on R2S
and allow to use the new added overclocked dtb's for R2S and R4S.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-12 07:04:17 +00:00
Peter Müller
816b0e08c6 firewall: Ensure the xt_geoip module is always loaded
For some reason, this module is not present after the very first boot of
an IPFire installation.

Fixes: #12767

Reported-by: Arne Fitzenreiter <arne_f@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-10 07:03:01 +00:00
Michael Tremer
c053efdcd1 Merge remote-tracking branch 'pmueller/temp-c164-development' into next 2022-02-02 19:46:13 +00:00
Stefan Schantl
ac7f39fcc6 rust-dirs: Commit accidenty forgotten patch.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:27 +00:00
Stefan Schantl
eda914944f rust-parking_lot_core: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:27 +00:00
Stefan Schantl
e831bad889 rust-termcolor: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:26 +00:00
Stefan Schantl
d1abeb8e44 rust-remove_dir_all: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:26 +00:00
Stefan Schantl
48a3d031ae rust-num_cpus: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:26 +00:00
Stefan Schantl
90b6ebe8f8 rust-rand-0.4: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:26 +00:00
Stefan Schantl
62d1644d16 rust-walkdir: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:25 +00:00
Stefan Schantl
c195a5174f rust-same-file: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:25 +00:00
Stefan Schantl
02c1439612 rust-home: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:25 +00:00
Stefan Schantl
6528a858c8 rust-getrandom: New package.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-02 19:43:24 +00:00
Robin Roevens
a06a552ccf pakfire: Fix small bug: wrong pak count on list
Fixes pakfire list installed/notinstalled command displaying the
count of all available paks instead of the count of actual installed
respectively not installed paks.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-01-31 17:36:04 +00:00
Peter Müller
bc176927e4 Merge branch 'next' into temp-c164-development 2022-01-30 13:18:50 +00:00
Arne Fitzenreiter
6b184642d2 leds: fix R4S sys led name at shutdown
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-30 08:50:22 +00:00
Arne Fitzenreiter
75c9d8c20c u-boot: add/fix NanoPi R2S and R4S
-update arm-trusted firmware to 2.6
-fix mac address generation on R2S because the CPUID fuses are not uniqe
-add support for NanoPi R4S

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-29 20:32:02 +00:00
Arne Fitzenreiter
75ccf29897 initskript leds: add NanoPi R4S
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-29 20:31:12 +00:00
Arne Fitzenreiter
b2b4417857 kernel: update to 5.15.17
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-29 20:30:21 +00:00
Peter Müller
37a9a0ba03 firewall: Align chain name to Collectd configuration
This fixes broken firewall hits graphs.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-29 17:59:31 +00:00
Peter Müller
92c53b3e0a firewall: Always initialise DROP_HOSTILE chain, even if it's unused
This ensures collectd can keep track of it, and generate the RRD graphs
correctly.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-29 15:56:54 +00:00
smooky@v16.de
df0635abb5 New Addons: qemu-ga 6.0.1 second try
>>> https://www.qemu.org/ <<<

source = https://download.qemu.org/qemu-6.0.1.tar.xz

Hi @ all

I have the addon qemu-ga for people who virtualize IPFire and to read the status
without having to install the whole qemu package.
Modified following Michael's suggestions.

Signed-off-by: Marcel Follert (Smooky) <smooky@v16.de>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-01-18 21:26:56 +00:00
Adolf Belka
5b28df47a5 shadow: Update to version 4.11.1 and fix bug 12762
- Update from 4.2.1 (2015) to 4.11.1 (2021)
- Update rootfile
- Update patch for suppression of groups installation
- Change default hash from sha512 to yescrypt in lfs and logins.def
- Changelog
   * Release 4.11.1
     * build: include lib/shadowlog_internal.h in dist tarballs (Sam James)
   * Release 4.11
     * Handle possible TOCTTOU issues in usermod/userdel (edneville)
       * (CVE-2013-4235)
       * Use O_NOFOLLOW when copying file
       * Kill all user tasks in userdel
     * Fix useradd -D segfault (Xi Ruoyao)
     * Clean up obsolete libc feature-check ifdefs (Alejandro Colomar)
     * Fix -fno-common build breaks due to duplicate Prog declarations
       (Adam Sampson)
     * Have single date_to_str definition (Alejandro Colomar)
     * Fix libsubid SONAME version (Sam James)
     * Clarify licensing info, use SPDX.
   * Release 4.10
      Note: From this release forward, su from this package should be
             considered deprecated. Please replace any users of it with su from
             util-linux. Please open an issue if there is a problem with that.
            We intend to remove it in an upcoming release.
            This release features many fixes expecially to the building of
             libsubid, some SELinux labeling issues, and a few signaling
             issues.
     * libsubid fixes (Xi Ruoyao, Serge Hallyn, Iker Pedrosa, Mike Gilbert,
       GalaxyMaster, and Luís Ferreira)
     * Rename the test program list_subid_ranges to getsubids, write
       a manpage, so distros can ship it. (Iker Pedrosa)
     * Add libeconf dep for new*idmap (Iker Pedrosa)
     * Allow all group types with usermod -G (Iker Pedrosa)
     * Avoid useradd generating empty subid range (Iker Pedrosa)
     * Handle NULL pw_passwd (Jaroslav Jindrak)
     * Fix default value SHA_get_salt_rounds (Mike Gilbert)
     * Use https where possible in README (Paul Menzel)
     * Update content and format of README (Iker Pedrosa)
     * Translation updates (Balint Reczey, Frans Spiesschaert)
     * Switch from xml2po to itstool in 'make dist' (Serge Hallyn)
     * Fix double frees (Michael Vetter)
     * Add LOG_INIT configurable to useradd (Andy Zaugg)
     * Add CREATE_MAIL_SPOOL documentation (Andy Zaugg)
     * Create a security.md
     * Fix su never being SIGKILLd when trapping TERM (Ruihan li)
     * Fix wrong SELinux labels in several possible cases (Iker Pedrosa)
     * Fix missing chmod in chadowtb_move (GalaxyMaster)
     * Handle malformed hushlogins entries (Tobias Stoeckmann)
     * Fix groupdel segv when passwd does not exist (François Rigault)
     * Fix covscan-found newgrp segfault (Iker Pedrosa)
     * Remove trailing slash on hoedir (Ed Neville)
     * Fix passwd -l message - it does not change expirey (Ed Neville)
     * Fix SIGCHLD handling bugs in su and vipw (Tobias Stoeckmann)
     * Remove special case for "" in usermod (Alejandro Colomar)
     * Implement usermod -rG to remove a specific group
       (Andy Zaugg)
     * call pam_end() after fork in child path for su and login
       (Björn Fischer)
     * useradd: In absence of /etc/passwd, assume 0 == root
       (Ludwig Nussel)
     * lib: check NULL before freeing data (Iker Pedrosa)
     * Fix pwck segfault (Iker Pedrosa)
     * Release 4.9
        2021-07-22  Serge Hallyn <serge@hallyn.com>
	 * Updated translations (Björn Esser, Juergen Hoetzel)
     * Major salt updates (Björn Esser)
     * Various coverity and cleanup fixes (Iker Pedrosa)
     * Consistently use 0 to disable PASS_MIN_DAYS  in man (tzccinct)
     * Implement NSS support for subids and a libsubid (Serge Hallyn)
     * setfcap: retain setfcap when mapping uid 0 (Christian Brauner)
     * login.defs: include HMAC_CRYPTO_ALGO key (Iker Pedrosa)
     * selinux fixes (Christian Göttsche)
     * Fix path prefix path handling (Lucas Servén Marín)
     * Manpage updates (tzccinct, Sevan Janiyan, Iker Pedrosa, Geert Ijewski,
		谭九鼎, Jamin W. Collins, towerpark, andydna, Frans Spiesschaert)
     * Treat an empty passwd field as invalid (Haelwenn Monnier)
     * newxidmap: allow running under alternative gid (Martijn de Gouw)
     * usermod: check that  shell is executable (Geert Ijewski)
     * Add yescript support (Rodolphe Bréard)
     * useradd memleak fixes (whzhe)
     * useradd: use built-in settings by default (Ludwig Nussel)
     * getdefs: add foreign (non-shadow-utils) items (Karel Zak)
     * buffer overflow fixes (Tobias Stoeckmann)
     * Adding run-parts style for pre and post useradd/del (ed@s5h.net)
       2020-01-23  Serge Hallyn <serge@hallyn.com>
	* selinux: inclue stdio (Michael Vetter)
	* man: don't suggest making groupmems user-writeable (Michael Weiser)
	* Makefile: bail out on error in for loops (Wolfgang Bumiller)
	* Adding logging of SSH_ORIGINAL_COMMAND to nologin. (ed@s5h.net)
	* add new HOME_MODE login.defs option (Duncan Overbruck)
	* Add tty logging to useradd (ed@s5h.net)
	* Useradd: make non-executable shell check only a warning (Tomas Mraz)
	* Update Dutch translation (Frans-Spiesschaert)
	* user_busy: Do not mistake a regular user process for a namespaced one (Tomas Mraz)
	* Revert "Honor --sbindir and --bindir for binary installation" Patrick McLean)
       2019-12-20  Dave Reisner <dreisner@archlinux.org>
	* Do not auto-enable acct_tools_setuid just because
	  pam is enabled.  NOTE - any distros which are relying
	  on this behavior will need to switch to configure
	  --enable-account-tools-setuid
   * Release 4.8
       2019-12-01  Serge Hallyn <serge@hallyn.com>
	* Initial optional bcrypt support.
	* Make build/install of 'su' optional.
	* Fix for vipw not resuming correctly when suspended
	* Sync password field descriptions in manpages
	* Check for valid shell argument in useradd
	* Allow translation of new strings through POTFILES.in
	* Migrate to itstool for translations
	* Migrate to new SELinux api
	* Support --enable-vendordir
	* pwck: Only check homedir if set and not a system user
	* Support nonstandard usernames
	* sget{pw,gr}ent: check for data at EOL
	* Add YYY-MM-DD support in chage
	* Fix failing chmod calls for suidubins
	* Fix --sbindir and --bindir for binary installations
	* Fix LASTLOG_UID_MAX in login.defs
	* Fix configure error with dash
    * Release 4.7
       2019-06-13  Serge Hallyn <serge@hallyn.com>
	* Spawn: don't loop forever on ECHILD
	* Do not fail locking if there is a stale lockfile Tomas Mraz)
	* Use lckpwdf if prefix not set (Tomas Mraz)
	* Build: check correct DocBook version (Jan Tojnar)
	* Usermod: Print 'no changes' to stdout, not stderr (Serge Hallyn)
	* Add support for btrfs subvolumes for home (Adam Majer)
	* Fix chpasswd long line handling (Nathan Ruiz)
	* Use secure_getenv for gettime (Chris Lamb)
	* Make sp_lstchg reproducible (Chris Lamb)
	* Do not crash commonio_close if db file is not open (Tomas Mraz)
	* Don't flush nscd and sssd cache in read-only mode (Charlie Vuillemez)
	* French manpage update (Alban VIDAL)
	* Fix manpage defaults for SUB_UID/GID_COUNT (Tomas Mraz)
	* Sync po files from shadow.pot (Alban VIDAL)
	* Usermod: guard against unsafe chown of homedir contents (Tomas Mraz)
	* Add LASTLOG_UID_MAX to login.defs (Tomas Mraz)
	* new[ug]idmap file capabilities support (Giuseppe Scrivano and Christian Brauner)
	* Fix segfault in useradd (Tomas Mraz)
	* Coverity issues (Tomas Mraz)
	* Flush sssd caches (Jakub Hrozek)
	* Log UID in nologin (Vladimir Ivanov)
	* run pam_getenvlist after setup_env in su.c (Michael Vogt)
	* Support systems with only utmpx (A. Wilcox)
	* Fix unguarded ENABLE_SUBIDS code (Jan Chren (rindeal))
	* Update po/zh_CN translation (Lion Yang)
	* Create parent dirs for useradd -m (Michael Vetter)
	* Prevent usermod segv
	* Fix usermod crash (fariouche)
    * Release 4.6
       2018-04-29  Serge Hallyn <serge@hallyn.com>
	* Newgrp: avoid unnecessary lookups
	* Make language less binary
	* Add error when turning off man switch
	* Spelling fixes
	* Make userdel work with -R
	* newgidmap: enforce setgroups=deny if self-mapping a group
	* Norwegian bokmål translation
	* pwck: prevent crash by not passing O_CREAT
	* WITH_TCB fixes from Mandriva
	* Fix pwconv and grpconv entry skips
	* Fix -- slurping in su
	* add --prefix option
       2017-07-16  Serge Hallyn <serge@hallyn.com>
	* Import new Dutch translations.
       2017-07-10  Serge Hallyn <serge@hallyn.com>
	* Expand error codes for groupmod.
       2017-05-17  Serge Hallyn <serge@hallyn.com>
    * Release 4.5
       2017-05-17  Serge Hallyn <serge@hallyn.com>
	* Patch from Tobias Stoeckmann fixing regression in previous CVE fix
	  preventing SIGTERM to su from being propagated to the job.
	* Patch from Chris Lamb making sp_lstchg shadow field reproducible.
	* Merge Russian translation updates from Yuri Kozlov
	* Fix missing close of subuid file on error
       2017-02-23  Serge Hallyn <serge@hallyn.com>
	* Merge patch by Tobias Stoeckmann <tobias@stoeckmann.org> to fix
	  the equivalent of util-linux CVE-2017-2616.
       2017-02-08  Serge Hallyn <serge@hallyn.com>
	* Update Kazakh translations
	* Consult configuration before calculating subuids
	* Remove misplaced semicolon
       2017-01-29  Serge Hallyn <serge@hallyn.com>
	* Patch from Fedora to improve performance with SSSD, Winbind,
	  or nss_ldap. (Tomas Mraz)
	* Make sure knowndef_table is NULL-terminated.  (Bernhard Rosenkränzer)
       2016-12-21  Serge Hallyn <serge@hallyn.com>
	* Drop leading underscore from _COMMONIO_H and _SHADOWIO_H
	* Fix readability in usermod error messages.
	* Reset user in tallylog
	* Add audit support to su
    * Changes since 4.4
       2016-12-02  Serge Hallyn <serge@hallyn.com>
	  - Use sizeof rather than hardcoding snprintf args
	  - Fix useradd improper default loading
	  - Update Vietnamese translations
	  - Update Polish translations
	  - Remove non-POSIX chmod option in Makefile
	  - Fix suidubins assignments
	  - Fix --add-subuids etc spelling in manpages
	  - Audit homedir ownership change.
	  - Print error on selinux file context update failure
	  - Keep original file perms when creating a backup
    * Changes since 4.2.1:
       2016-12-02  Serge Hallyn <serge@hallyn.com>
	  - Documentation, error report and translations updates
	  - Replace path_max with 32
	  - User namespace support fixes/updates including:
	    - Correct sanity checks in newXidmap
	    - Fix building without subuid support
	    - Add /etc/subuid support for UID matching
	    - Support subuid for nonlocal users
	    - Default to 65536 subuid allocations
	    - Respect -r
	    - Check for range overflows
	  - Add tests from svn tree
	  - Use AC_CHECK_SIZEOF for uid_t size checks
	  - Accomodate missing /etc and login.defs
	  - Support FORCE_SHADOW
	  - Be more robust in hostile environment
	  - Allow removing a primary group
	  - Clear passwords on __pw_dup errors
	  - Memory leak fix in commonio_update and get_map_ranges
	  - Fix resource leak in syslog_sg
	  - Fix user busy error at userdel
	  - Support set/clear lastlog record via lastlog command
	  - Add --no-create-home as longopt for -M
	  - Fix signal races
	  - Reduce syslog priority of common usage events

Fixes: Bug 12762
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-18 21:23:42 +00:00
Peter Müller
04581dfb77 Merge branch 'next' into temp-c164-development 2022-01-18 21:12:56 +00:00
Arne Fitzenreiter
68a50dd12d installer: add partitions as installation source
This add compatiblity for rufus usb-keys that convert the
iso to fat or ntfs partition.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-01-16 13:46:36 +00:00
Peter Müller
cbc279b070 Merge branch 'next' into temp-c164-development 2022-01-15 08:31:48 +00:00
Arne Fitzenreiter
14aa983025 Revert "shadow: Update to version 4.9"
This reverts commit 66852447f1.

with this version of shadow passwd need more than 10min on all my systems
even if they had rdrand.
2022-01-15 07:24:24 +00:00
Peter Müller
97154d057b firewall: Introduce DROP_HOSTILE
Similar to the Location block, this chain logs and drops all traffic
from and to networks known to pose technical threats to IPFire users.

Doing so in a dedicated chain makes sense for transparency reasons, as
we won't interfer with other firewall rules or the Location block, so it
is always clear why a packet from or to such a network has been dropped.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:43 +00:00
Peter Müller
e83ae0d434 firewall: Prevent spoofing our own RED IP address
There is no legitimate reason why traffic from our own IP address on RED
should ever appear incoming on that interface.

This prevents attackers from impersonating IPFire itself, and is only
cleared/reset if the RED interface is brought up. Therefore, an attacker
cannot bypass this by foring a dial-up or DHCP connection to break down.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:39 +00:00
Peter Müller
a36cd34eac firewall: Log and drop spoofed loopback packets
Traffic from and to 127.0.0.0/8 must only appear on the loopback
interface, never on any other interface. This ensures offending packets
are logged, and the loopback interface cannot be abused for processing
traffic from and to any other networks.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:34 +00:00
Peter Müller
4d25c1f39a firewall: Accept inbound Tor traffic before applying the location filter
Inbound Tor traffic conflicts with Location block as inbound connections
have to be accepted from many parts of the world. To solve this,
inbound Tor traffic has to be accepted before jumping into Location block
chain.

Note this affects Tor relay operators only.

Rolled forward as ongoing from
https://patchwork.ipfire.org/project/ipfire/patch/f8ee2e1d-b642-8c63-1f8a-4f24c354cd90@ipfire.org/,
note the documentation in the wiki needs to be updated once this landed
in production.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:29 +00:00
Peter Müller
0e7bfb1343 firewall: Log packets dropped due to conntrack INVALID state
In case of faulty connection tracking, this ensures such packets are
logged, to make analysing network incidents less troublesome. Since
NewNotSYN is handled before, where logging can be turned off for systems
running on weak flash devices, the amount of log messages emitted here
should be neglectible.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:16:24 +00:00
Peter Müller
86cf6898aa Merge branch 'master-IDSv3' into temp-c164-development 2022-01-14 14:05:10 +00:00
Matthias Fischer
96b9c63b57 squid 5.1: set max number of filedesriptors to 32768
Since the maximum number of filedescriptors which are possible for 'squid 5.1'
are now 32768, I modified the initscript accordingly.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-01-14 13:58:31 +00:00
Adolf Belka
084bd67b62 libvirt: Update to version 7.10.0
- Update from 6.5.0 to 7.10.0 (17 releases between these versions)
- Update of rootfile
- Update of patch as source file contents changed enough that old patch failed to work
- Build changed to meson/ninja as autotools option has been removed
- Most of the existing options were available as meson options - look in
   meson_options.txt file in the source tarball.
   Three options were not available with meson
   --with-virtualport
   --with-macvtap
   --without-dbus
- Changelog is too large to include here (~1200 lines) but the detail can be seen in the
   NEWS.rst file in the source tarball. Many bug fixes identified in the changelog

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2022-01-14 13:42:04 +00:00
Arne Fitzenreiter
da4d9c4774 Merge remote-tracking branch 'pmueller/temp-c163-development' into next 2022-01-02 10:13:14 +00:00
Michael Tremer
91588cb42a installer: Ignore umount errors when target doesn't exist
Some paths might not exist on some systems which caused the installer to
abort the installation. This patch makes the installer ignore this
condition.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-12-22 16:07:49 +00:00
Stefan Schantl
27671216d5 update-ids-ruleset: Early exit script if lockfile exists.
This prevents from running the script while the WUI is performing
operations at the same time or to launch multiple instances of the
script.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:45 +01:00
Stefan Schantl
6875f9ce7c update-ids-ruleset: Port script to work with multiple providers.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:43 +01:00
Peter Müller
d01b47b771 Merge branch 'next' into temp-c163-development
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2021-12-13 12:51:26 +01:00
Stefan Schantl
65d5ec52ce suricata: Disable sid 2210059.
This rule emits a massive logspam and temporary will be disabled until
a better solution is found.

Fixes #12738.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-12-11 09:51:24 +00:00
Adolf Belka
725ffd6f03 bash: Update to version 5.1.8 plus patches 9 to 12
- Update main file from 5.1 to 5.1.8 (includes patches 1 to 8)
- Remove patches 1 to 4
- Changelog - Patches 1 to 4 from the previous IPFire version together with patches 5 to
     8 are now included into bash-5.1.8 followed by application of patches 9 to 12
   Patch 12
    There is a possible race condition that arises when a child process receives
     a signal trapped by the parent before it can reset the signal dispositions.
     The child process is not supposed to trap the signal in this circumstance.
   Patch 11
    When reading a compound assignment, and running it through the parser to
     split it into words, we need to save and restore any alias we're currently
     expanding.
   Patch 10
    If `wait -n' is interrupted by a trapped signal other than SIGINT, it does
     not completely clean up state, and that can prevent subsequent calls to
     `wait -n' from working correctly.
   Patch 9
    The bash malloc implementation of malloc_usable_size() does not follow the
     specification. This can cause library functions that use it to overwrite
     memory bounds checking.
   Patch 8
    Process substitution FIFOs opened by child processes as targets of redirections
     were not removed appropriately, leaving remnants in the file system.
   Patch 7
    The code to check readline versions in an inputrc file had the sense of the
     comparisons reversed.
   Patch 6
    Make sure child processes forked to run command substitutions are in the
     proper process group.
   Patch 5
    Fix two memory leaks when assigning arrays using compound assignment syntax.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2021-12-09 20:59:43 +01:00