Following an issue on xp-pen-tablet, also maintained by @labaman, the install script introduces a privilege escalation vulnerability by giving every user write privileges on .so files:
chmod +0755 $DesktopDir/$appDesktopName
chmod +0644 $AppIconDir/$appIconName
chmod +0755 $appDir/$AppName
chmod +0755 $appDir/$exeShell
chmod +0666 $appDir/resource.rcc
chmod +0666 $confPath/config.xml
chmod +0666 $confPath/language.ini
chmod +0666 $confPath/name_config.ini
chmod +0666 $libPath/libicudata.so.56
chmod +0666 $libPath/libicui18n.so.56
chmod +0666 $libPath/libicuuc.so.56
chmod +0666 $libPath/libQt5Core.so.5
chmod +0666 $libPath/libQt5DBus.so.5
chmod +0666 $libPath/libQt5Gui.so.5
chmod +0666 $libPath/libQt5Network.so.5
chmod +0666 $libPath/libQt5Widgets.so.5
chmod +0666 $libPath/libQt5X11Extras.so.5
chmod +0666 $libPath/libQt5XcbQpa.so.5
chmod +0666 $libPath/libQt5Xml.so.5
chmod +0666 $platPath/libqxcb.so
This means that any user can change the code of these libraries to introduce malicious code, and if another (hopefully more privileged) user starts the xp-pen driver, that malicious code will be executed with their privileges.
I can think of no reason for these files to be writable by anyone and in light of the security vulnerability it introduces, the install script should be modified.
In the meantime users should change the permissions of all writable files in /usr/lib/pentablet/, in particular in lib/ and platforms/ which contain .so files.
Pinned Comments
labaman commented on 2024-06-11 16:52 (UTC) (edited on 2024-06-11 16:57 (UTC) by labaman)
This driver version is for legacy XP-PEN graphics tablets (such as Star V2, Deco Mini7, etc.), for newer models use this package.