A new version of check_smart, a monitoring plugin to monitor hard drives (HDD), solid state drives (SSD) and NVMe drives, is available.
The newest release, 6.18.2, is a bugfix release and fixes a regression previously introduced in 6.18.1.
In version 6.18.1, a security release, the handling of symbolic links was adjusted. It could have been possible (before 6.18.1) to create a symlink to a malicious file and abuse as command injection. Following this, symlinks have been disabled.
But this created a problem for users that used the /dev/disk/ directory as device path. As you might be aware, /dev/disk/ subdirectories contain symbolic links to the relevant block device. For example:
$ ./check_smart.pl -i ata -d /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX --debug
(debug) Found /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX
(debug) /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX is a symlink, skipping for security reasons
Could not find any valid block/character special device for device /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX !
The regression fix is in the latest release 6.18.2, available from today. It allows to use symlinks but also verifies that the real path behind the symlink is an actual block device/drive.
$ ./check_smart.pl -i ata -d /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX --debug
(debug) Found /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX
(debug) /dev/disk/by-id/ata-Samsung_SSD_850_EVO_500GB_XXXXXXXXXXXXXXXX is a symlink to block device /dev/sdb, using resolved path
###########################################################
(debug) CHECK 1: getting overall SMART health status for /dev/sdb
###########################################################
[...]
In order to do that, the Perl module Cwd needs to be loaded additionally. As this is part of the Perl standard library, I'm fairly certain that it won't break compatibility and won't require additional requirements.
The regression was reported by Simon F, thanks a lot for the collaboration!
No comments yet.
AWS Android Ansible Apache Apple Atlassian BSD Backup Bash Bluecoat CMS Chef Cloud Coding Consul Containers CouchDB DB DNS Databases Docker ELK Elasticsearch Filebeat FreeBSD Galera Git GlusterFS Grafana Graphics HAProxy HTML Hacks Hardware Icinga Influx Internet Java KVM Kibana Kodi Kubernetes LVM LXC Linux Logstash Mac Macintosh Mail MariaDB Minio MongoDB Monitoring Multimedia MySQL NFS Nagios Network Nginx OSSEC OTRS Observability Office OpenSearch PHP Perl Personal PostgreSQL PowerDNS Proxmox Proxy Python Rancher Rant Redis Roundcube SSL Samba Seafile Security Shell SmartOS Solaris Surveillance Systemd TLS Tomcat Ubuntu Unix VMware Varnish Virtualization Windows Wireless Wordpress Wyse ZFS Znuny Zoneminder