7183 Commits

Author SHA1 Message Date
nicolargo
988cad6847 version 4.5.5 v4.5.5 2026-06-13 15:35:04 +02:00
nicolargo
402f9f48da Merge branch 'develop' 2026-06-13 15:31:16 +02:00
nicolargo
fc911f8543 Prepare Glances for release 2026-06-13 15:30:51 +02:00
Nicolas Hennion
ac7b1106c4 Merge pull request #3580 from gstangel/feat/tegra-jetson-gpu-sysfs-fallback
feat(gpu): support NVIDIA Jetson (Tegra) integrated GPU via sysfs
2026-06-08 10:13:24 +02:00
Gabriel St. Angel
3107c6ac51 feat(gpu): support NVIDIA Jetson (Tegra) integrated GPU via sysfs fallback
On Jetson (Tegra) the integrated GPU is enumerated by NVML
(nvidia-l4t-nvml) and reports its name (e.g. "Orin (nvgpu)"), but the
per-metric NVML queries return NVML_ERROR_NOT_SUPPORTED, so the GPU
plugin only ever showed N/A for proc/mem/temperature.

Add a Tegra sysfs backend (glances/plugins/gpu/cards/tegra.py) and wire
it into the NVIDIA card as a per-metric fallback: when NVML returns None
for a device detected as Tegra (name contains "nvgpu", or the Tegra GPU
sysfs node exists), read:

- proc:        /sys/devices/platform/gpu.0/load  (per-mille -> percent)
- temperature: the gpu-thermal /sys/class/thermal zone (milli-C -> C)

Memory stays N/A by design: the Tegra GPU shares system RAM, already
reported by the MEM plugin. Scales verified against tegrastats
(GR3D_FREQ and gpu@).

Adds unit tests with committed sysfs fixtures, a NEWS.rst entry and a
docs note.

Verified on JetPack 6.2.1 (L4T R36.4.7) and JetPack 7.2 (L4T R39.2):
identical sysfs node layout and gpu-thermal zone selection on both, with
temperature cross-checked against tegrastats on each.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 06:59:59 +00:00
nicolargo
6d72447181 Update docs 2026-06-06 14:50:00 +02:00
nicolargo
879658fb14 Merge branch 'GHSA-3vwc-qwhc-3mj7' into develop 2026-06-06 08:24:32 +02:00
nicolargo
813a4ec99b Arbitrary file write and command execution via redirection and chaining operators in AMP command configuration - GHSA-3vwc-qwhc-3mj7 - CVE-id-tbd 2026-06-06 08:24:14 +02:00
Nicolas Hennion
82d7dfbda3 Merge pull request #3578 from williamqwu/fix_amd_card_glob
Fix AMD GPU detection for multi-digit DRM card numbers.
2026-06-05 13:34:05 +02:00
William Wu
1d1202555a Fix AMD GPU detection for multi-digit DRM card numbers 2026-06-05 03:58:50 -04:00
Nicolas Hennion
bcc30d0c68 Merge pull request #3572 from arieleli01212/feat/issue-top10-slow-plugins
feat(issue): add top 10 slowest plugins summary at end of --issue output
2026-06-02 08:26:18 +02:00
Ariel Eli
ca916de57e feat(issue): add top 10 slowest plugins summary at end of --issue output 2026-06-01 20:27:30 +03:00
nicolargo
1f5aead12c Merge branch 'issue3559' into develop 2026-05-31 17:35:59 +02:00
nicolargo
2e5ab02bda Get back to default ThreadedIterableStreamer.sleep_duration to 0.1 second 2026-05-31 17:35:44 +02:00
nicolargo
e68e9f4452 Add unit test to containers/docker plugin 2026-05-31 17:34:25 +02:00
nicolargo
2353e49655 Make only one API call for multiple containers (use sparse=True option). Also correct behavor for Podman and LXD. 2026-05-31 17:33:37 +02:00
nicolargo
d050ab4151 Merge branch 'issue3559' into develop 2026-05-30 09:18:23 +02:00
nicolargo
476a26defc Try to reduce the time between two containers when stats are collected - #3559 2026-05-30 09:18:08 +02:00
nicolargo
4f399c41b2 Merge branch '20086080-Issue-3555_load_additional_plugins' into develop 2026-05-23 15:50:00 +02:00
nicolargo
2afc533d67 Merge branch 'Issue-3555_load_additional_plugins' of github.com:20086080/glances into 20086080-Issue-3555_load_additional_plugins 2026-05-23 15:48:42 +02:00
nicolargo
07080cdca4 Update WebUI, requirements and docs 2026-05-23 15:42:02 +02:00
nicolargo
3fdd03964b Merge branch 'GHSA-v5r2-qh84-fjx5' into develop 2026-05-23 12:27:38 +02:00
nicolargo
ff3eec3295 Command Injection via KVM/QEMU VM Domain Names in glances/plugins/vms/engines/virsh.py - CVE-2026-46606 2026-05-23 12:27:19 +02:00
nicolargo
e1f6c387dd Command Injection via KVM/QEMU VM Domain Names in glances/plugins/vms/engines/virsh.py - CVE-2026-46606 2026-05-23 12:27:00 +02:00
nicolargo
6986c382d9 Merge branch 'GHSA-9837-48hr-q32j' into develop 2026-05-23 11:57:50 +02:00
nicolargo
cf14166fbe test(outdated): json round-trip and graceful migration from legacy pickle cache
Cover the non-RCE behaviour of the new JSON cache:
- round-trip: written file is valid JSON, re-read produces equivalent dict
- legacy pickle: a pre-fix pickle cache is treated as a cache miss, not
  a crash (upgrade path)
- expiry: caches older than 7 days are invalidated
- version skew: caches written by a different installed version are
  invalidated
- first run: a missing file is not an error
2026-05-23 11:52:53 +02:00
nicolargo
622994add7 fix(outdated): replace pickle with json for version cache (GHSA-9837-48hr-q32j)
The version-check cache at $XDG_CACHE_HOME/glances/glances-version.db is
read at every Glances startup via pickle.load() — an execution-capable
deserialization format. Any process able to write that path (local user
on a shared host, sibling container on a shared volume, symlink race
during first run) could plant a pickle whose __reduce__ runs arbitrary
code as the Glances user, including root in typical deployments.

Switch to json for both load and save. The stored payload is trivial:
two strings plus a timestamp that round-trips via isoformat(). Any
unreadable, malformed, or legacy-pickle file is caught by the existing
exception handler and treated as a cache miss — the next PyPI refresh
overwrites it with a JSON file. No user-visible behaviour change.

The pickle module is removed from the imports — it has no other use in
this file.

Mitigates CVE-2026-46607.
2026-05-23 11:51:36 +02:00
nicolargo
7098478c39 test(outdated): failing test — malicious pickle cache must not execute (CVE-2026-46607)
Regression test for GHSA-9837-48hr-q32j: glances/outdated.py reads its
version-check cache file via pickle.load(), a deserialization format
that executes arbitrary callables embedded via __reduce__.

The test plants a poisoned pickle at the cache path and asserts that
_load_cache() does NOT trigger the embedded callable. Against the
current (vulnerable) code this fails because the payload fires before
the TypeError is raised on the unrelated dict subscript.

The fix in the next commit replaces pickle with json, which is a passive
data format.
2026-05-23 11:50:55 +02:00
nicolargo
74c5352ebc Merge branch 'GHSA-87qc-fj39-wccr' into develop 2026-05-23 11:40:35 +02:00
nicolargo
0de3b8f875 XML-RPC Multi-Origin CORS Configuration Silently Falls Back to Wildcard - CVE-2026-46608 2026-05-23 11:40:20 +02:00
nicolargo
8eeacd8856 Merge branch 'GHSA-w856-8p3r-p338' into develop 2026-05-23 10:04:50 +02:00
nicolargo
16c7ca8e13 Update other glances.conf file 2026-05-23 10:04:32 +02:00
nicolargo
4976bd7509 docs(quickstart): document xmlrpc_allowed_hosts DNS rebinding protection
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:56:46 +02:00
nicolargo
d9316dfac2 docs(conf): document xmlrpc_allowed_hosts in glances.conf
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:56:28 +02:00
nicolargo
cbc22e77d4 feat(server): warn at startup when XML-RPC server has no Host allowlist
Mirrors the existing REST/WebUI warning style. Makes unprotected
XML-RPC deployments visible to operators without changing default
behaviour (no enforcement).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:56:15 +02:00
nicolargo
cad6f985a5 test(xmlrpc): port stripping and missing-Host edge cases
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:53:06 +02:00
nicolargo
8e6c9c955c test(xmlrpc): wildcard Host patterns via fnmatch
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:52:30 +02:00
nicolargo
575dc7e81b test(xmlrpc): allowlisted Host returns 200
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:51:58 +02:00
nicolargo
5961e0b507 fix(server): validate Host header in XML-RPC server (GHSA-w856-8p3r-p338)
Add opt-in DNS rebinding protection to the XML-RPC server via a new
xmlrpc_allowed_hosts config key in [outputs]. When set, the handler
rejects requests whose Host header does not match any of the listed
patterns (fnmatch wildcards supported). Validation runs before
authentication so spoofed Host values are rejected regardless of
credentials.

Default behaviour is unchanged (no allowlist = no filtering). A
startup warning is added in a follow-up commit to make unprotected
deployments visible to operators.

Mitigates CVE-2026-46611.
2026-05-23 09:51:25 +02:00
nicolargo
b88dd7bcfd test(xmlrpc): failing test — spoofed Host should be rejected (CVE-2026-46611)
Adds a second test server bound to a config that enables xmlrpc_allowed_hosts,
plus the failing assertion that a spoofed Host header returns 400. The fix in
glances/server.py follows in the next commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:50:40 +02:00
nicolargo
b2965cca96 test(xmlrpc): lock in current permissive default (regression baseline)
This test passes on the unpatched server and proves the CVE-2026-46611
vulnerability exists today: a spoofed Host header is accepted.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:49:43 +02:00
nicolargo
01437d61e2 test(xmlrpc): scaffold for Host header validation tests
Re-creates tests/test_xmlrpc.py (deleted symlink) with a pytest module
modelled on test_restful.py: subprocess-launched server and a helper
to POST XML-RPC calls with a controllable Host header. Restores the
existing 'make test-xmlrpc' Makefile target.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:48:47 +02:00
nicolargo
8b6cab83e8 docs(plan): implementation plan for GHSA-w856-8p3r-p338 XML-RPC fix
11-task TDD plan covering test scaffold, regression baseline,
parse_request Host validation, wildcard/port/missing-Host edge
cases, startup warning, conf entry, docs and lint/format check.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:43:23 +02:00
nicolargo
bcbeae7af6 docs(spec): design for GHSA-w856-8p3r-p338 XML-RPC Host validation
Design document for CVE-2026-46611 patch: add opt-in Host header
validation to the XML-RPC server via a new xmlrpc_allowed_hosts
config key, with permissive default and startup warning (mirrors
the REST/WebUI mitigation pattern).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 09:38:43 +02:00
Nicolas Hennion
2cfc64e8e9 Update MCP configuration instructions in mcp.rst
Added instructions for configuring Glances MCP from the Claude command line.
2026-05-21 17:18:50 +02:00
20086080
bcc18b4ab3 Fix : Codacy 2026-05-21 03:06:41 +00:00
20086080
389b6d45bb Fix : Codacy 2026-05-21 02:57:23 +00:00
20086080
c3a8fb2f05 Test : Unit tests 2026-05-21 02:22:17 +00:00
20086080
86f821340d Doc : Comments 2026-05-20 15:23:45 +00:00
20086080
b71094adc5 Refactor : load_additional_plugins seperation of concerns 2026-05-20 15:16:45 +00:00