Commit graph

1,929 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
9ad6e11b14
ui,popups: fixed crash when using some languages
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
v1.7.1
Closes: #1353.
2025-06-27 10:13:46 +02:00
Gustavo Iñiguez Goia
c82daddbae
ebpf dns improvements
- Better handling of burst messages.
 - Empty the queue if it gets full.
2025-06-25 00:57:07 +02:00
Gustavo Iñiguez Goia
7eb1cbf90d
improved proc monitors errors
- Avoid sending duplicated errors.
 - Fixed sending error message when the ebpf events module fails to
   load.
2025-06-22 22:23:36 +02:00
Gustavo Iñiguez Goia
5bf02e6f70
Bumped pkg versions to v1.7.1 2025-06-20 13:36:50 +02:00
Gustavo Iñiguez Goia
e13b4b9f76
updated config tests 2025-06-19 23:49:45 +02:00
Gustavo Iñiguez Goia
a4d8d1bb27
improved daemon's connection logic with the server (GUI)
- New: if Server.Address is not set, stop the routine that attempts
   to connect with the remote server.
 - Spawn only one polling routine.
 - When changing the configuration:
   - if the new server.address changed and is not empty -> reconnect.
   - if the new server.address changed and is empty -> disconnect.
   - if previous server.address was empty and the new one is not -> connect.
   - if the authentication settings changed -> reconnect.

   If the server.address is not available, we'll try to connect
   indefinitely.
2025-06-19 01:59:30 +02:00
Gustavo Iñiguez Goia
acd5b8886b
Bumped versions to v1.7.1 2025-06-18 01:10:23 +02:00
Gustavo Iñiguez Goia
f1318ef12d
fixed loading config when the procmon fails
- Fixed configuration loading, when the Process Monitor Method
   selected failed to work (e.g.: when ebpf modules are missing,
   auditd is not configured, etc).
   In this scenario, on the first run, the daemon was not loading the
   configuration from disk, and was instead using the default values, which
   led to some glitches (unexpected reconnections to the GUI, checksums
   option ignored, etc).
 - added more tests.
2025-06-18 00:35:17 +02:00
Gustavo Iñiguez Goia
9f570ea9ad ebpf events improvements
Discard events from the queue if we can't send events to the channel.
It can happen if the case of a deadlock such as in ac3053af327e38acad4ff4024ed688ed68d6ae30

In this situation, reading from the ring buffer is blocked, which
eventually causes it to fill up.
When the ring buffer is full, bpf_ringbuf_output() fails with error -11.
2025-06-15 23:10:09 +02:00
Gustavo Iñiguez Goia
c198f0119f improved events cache
Under very high load of kernel events, combined with a
non-zero value for the ebpf.QueueEventsSize config option,
the cache could end up blocking the events workers if the option to
compute process checksums was enabled.
2025-06-15 23:10:09 +02:00
Gustavo Iñiguez Goia
d5042f5b92
Merge pull request #1366 from tredondo/patch-1
Simplify uname -a in bug_report.md
2025-06-13 00:57:49 +02:00
Gustavo Iñiguez Goia
f0b1173d9d added Process path+args tests 2025-06-12 23:43:59 +02:00
Gustavo Iñiguez Goia
f87c3ae655
ui,popups: improved checksums verification
Verify the checksum of complex rules. Previously we only verified rules
of type Simple.
2025-06-12 00:28:58 +02:00
Ted Robertson
cd6b479f70
Simplify uname -a in bug_report.md 2025-06-11 10:21:10 +03:00
Gustavo Iñiguez Goia
f230b706b7
ui: improved downloader plugin
Create the paths where the files will be downloaded.
2025-06-08 23:59:51 +02:00
Gustavo Iñiguez Goia
376b06ef97
improved binary absolute path retrieval
When receiving the paths of a binary from kernel, the path can be a
symlink to the real binary on disk, and we were not obtaining the real
path to the binary.

Now we'll try to obtain it. If we fail, we'll use the path received from
the kernel. And if it's empty, we'll fallback to read it from proc.

Closes #1357
2025-06-07 23:51:13 +02:00
Gustavo Iñiguez Goia
aa37ac3e3a loggers: changed log level from Warn to Debug
When the remote logger cannot connect to the server, avoid flooding the
logs with warnings.
2025-06-05 20:47:29 +02:00
Gustavo Iñiguez Goia
32f4ab936e
Merge pull request #1359 from munix9/dist_path
check whether dist_path exists
2025-06-05 20:22:26 +02:00
munix9
6bbed9dd67
check whether dist_path exists
"dist_path" seems to be a debian thing, in openSUSE for example the path does not exist.
2025-06-05 11:31:44 +02:00
Gustavo Iñiguez Goia
856c83f84b
Merge pull request #1355 from tioguda/master
i18n: updated Brazilian Portuguese translation
2025-06-04 02:13:03 +02:00
tioguda
222fce1e93
i18n: updated Brazilian Portuguese translation 2025-06-03 20:18:53 -03:00
Gustavo Iñiguez Goia
a3826c50c9
improved remote logger
- Added MaxConnectAttempts configuration option:
   If not specified, it defaults to 0, which means that we'll try to connect
   indefinitely to the remote server.

 - Improved connection retry behaviour:
   We were not reconnecting to the server if we failed to connect on the
   first attempt. Now we'll try to connect until MaxConnectAttempts, or
   indefinitely if not specified (default value 0).

 - If the logger is not connected to the remote server, don't send
   messages to the queue.

Closes #1350.
2025-06-02 23:25:43 +02:00
Gustavo Iñiguez Goia
dc83aa62f0
Updated pkgs versions
Some checks failed
CI - build eBPF modules / build (6.0, 1.5.0) (push) Has been cancelled
CI - build eBPF modules / build (6.0, master) (push) Has been cancelled
Test resources validation / Install tools (push) Has been cancelled
Build status / Build (push) Has been cancelled
v1.7.0.0
2025-05-30 11:02:36 +02:00
Gustavo Iñiguez Goia
54a8efb32f
i18n: renamed ukranian translation file 2025-05-29 00:34:56 +02:00
Gustavo Iñiguez Goia
7a3ad173e1
i18n: added ukranian translation 2025-05-29 00:24:50 +02:00
Gustavo Iñiguez Goia
9b0cf5a85f
pkgs: fixed locales
We were distributing locales twice, under opensnitch/i18n/ and
opensnitch/i18n/locales/.

This also caused to display an empty language in the Preferences
languages combo box.
2025-05-28 23:54:09 +02:00
Gustavo Iñiguez Goia
2fbbf12e0a
ui: translations updated 2025-05-28 22:35:00 +02:00
Gustavo Iñiguez Goia
9009eef635
ui: added HighContrast theme icons
The HighContrast theme is part of the gnome-themes-standard [0] package
, which is not always available.

Instead of just setting the theme by code, now we distribute the icons.
This ensures that the icons are always clearly visible when using a
qt-material dark theme.

For qt-material light themes and system themes, we'll use the system
icons.

[0] https://download.gnome.org/sources/gnome-themes-standard/
2025-05-23 22:30:19 +02:00
Gustavo Iñiguez Goia
ef926050c2
fixed listening for link changes (#1343)
netlink.AddrSubscribeWithOptions() was causing systemd-resolved not to
obtain DNS servers, and therefore the system was unable to resolve
domain names.

This ssue started happening on Fedora 42, with systemd-resolved 257 and
kernels 6.14.x.

Using netlink.AddrSubscribe() solves this issue for now.

Closes #1343
2025-05-23 12:53:29 +02:00
Gustavo Iñiguez Goia
e0c659992a
fixed leak reconfiguring rules monitor task 2025-05-23 11:40:43 +02:00
Gustavo Iñiguez Goia
b20fd15335
changed ebpf log levels
Changed Error to Warning log level when failing to load hooks.

Except for udp_tunnel6_xmit_skb, which depends on the module
ip6_udp_tunnel to be loaded, which by default is not the case.
In order not to flood the logs with this error, log level changed to
Debug.
2025-05-21 21:49:15 +02:00
Gustavo Iñiguez Goia
3f5b6b45a7
ui: added default terminal icon for popups
By default we try to discover the icon of an app, but if we don't find
any, we'll use a default terminal icon (from HighContrast theme).
2025-05-21 19:10:43 +02:00
Gustavo Iñiguez Goia
913a88ccd6
ui: use HighContrast icons for dark qt-material themes
By default we use the system icons theme in the GUI.
The Desktop Environment usually is responsible of switching between
dark and light styles.

However if the user selected a qt-material dark theme from the
Preferences, the icons were not updated, and sometimes they were
practically invisible.

Now if the user selects a qt-material dark theme, we set the
HighContrast icon theme, which ensures that all icons are visible
against dark backgrounds.
2025-05-19 01:22:51 +02:00
Gustavo Iñiguez Goia
4ec3ac72f6
Merge pull request #1344 from ddogfoodd/unused-imports
ui: remove unused imports
2025-05-19 00:58:34 +02:00
Jost Alemann
f09ae22c61 ui: remove unused imports 2025-05-18 20:40:39 +02:00
Gustavo Iñiguez Goia
ce26feea4b Bump packages versions to v1.7.0 2025-05-17 11:58:24 +02:00
Gustavo Iñiguez Goia
582823d34a
ui: added English language to the preferences
Allow to select English language from the Preferences.

This is a static entry like "System default".

It will not load a QTranslator object, so the GUI will use the strings
defined in the code, which are in English.

Closes: #1342
2025-05-14 23:24:38 +02:00
Gustavo Iñiguez Goia
56b2d28b66
ebpf: added support for ipv6 tunnels
In order to intercept UDP tunnels traffic, we use iptunnel_xmit for IPv4
connections. The equivalent of IPv6 would be ip6tunnel_xmit, but
unfortunately it's not public.

So instead of ip6tunnel_xmit, we'll use udp_tunnel6_xmit_skb.

This function receives two parameters besides the struct sock*, in6_addr
*saddr and in6_addr *daddr. If these addresses are not set, usually the
connection is a localhost connection.

On the other hand, this function is defined in the module
ip6_udp_tunnel. If this module is not loaded when the daemon starts,
we'll fail to intercept the connections.

Closes: #1250
2025-05-05 00:34:25 +02:00
Gustavo Iñiguez Goia
02da9b7a09
Merge pull request #1339 from Dandan336/master
Add loongarch64 support
2025-05-01 00:21:06 +02:00
Dandan Zhang
45c591bbc4 Add loongarch64 support 2025-04-30 02:39:27 +00:00
Gustavo Iñiguez Goia
568d69520f
fixed reporting connection UID
When getting a connection from the cache, use the UID of the connection,
instead of the process UID.

more info: https://github.com/evilsocket/opensnitch/issues/1315#issuecomment-2829072245

Closes: #1315
2025-04-27 23:54:52 +02:00
Gustavo Iñiguez Goia
94913683e0
Merge pull request #1336 from petterreinholdtsen/ebpf-riscv64
Added ebpf build rule mapping for riscv64 to riscv.
2025-04-27 23:28:23 +02:00
Petter Reinholdtsen
94f950120f Added ebpf build rule mapping for riscv64 to riscv.
This ensure the kernel headers are found during compilation.
2025-04-27 06:35:22 +02:00
Gustavo Iñiguez Goia
0576c71d77
Merge pull request #1335 from petterreinholdtsen/ebpf-loongarch64
Added ebpf build rule mapping for loongarch64 to loongarch.
2025-04-27 01:09:51 +02:00
Petter Reinholdtsen
f680bbedd6 Added ebpf build rule mapping for loongarch64 to loongarch.
This ensure the kernel headers are found during compilation.
2025-04-26 22:35:21 +02:00
Gustavo Iñiguez Goia
8248c2e0ed ui: better app icon discovery
On some DEs like Xfce4 (Ubuntu 24) we were not displaying icons on the
popups.
2025-04-25 17:30:14 +02:00
Gustavo Iñiguez Goia
f077ac8f19
Merge pull request #1333 from petterreinholdtsen/ebpf-s390x
Added ebpf build rule mapping for s390x to s390.
2025-04-25 17:24:38 +02:00
Petter Reinholdtsen
25ea03a8e6 Added ebpf build rule mapping for s390x to s390.
This ensure the kernel headers are found during compilation.
2025-04-25 08:03:07 +02:00
Gustavo Iñiguez Goia
aeb2018d27
log the UID of exec events 2025-04-24 23:55:42 +02:00
Gustavo Iñiguez Goia
12c21c7a26
removed debug line 2025-04-24 23:53:50 +02:00