Red Hat Polkit Out-of-Bounds Read and Write Vulnerability — The Red Hat polkit pkexec utility contains an out-of-bounds read and write vulnerability that allows for privilege escalation with administrative rights.
CVE-2021-4034 is a critical privilege escalation vulnerability in Red Hat Polkit's pkexec utility that allows local attackers to gain root privileges through out-of-bounds memory access. With a CVSS score of 9.0 and publicly available exploits, this vulnerability poses an immediate threat to all Linux systems running vulnerable Polkit versions. Immediate patching is essential for all Saudi organizations operating Linux infrastructure.
IMMEDIATE ACTIONS:
1. Identify all systems running Polkit (check: rpm -qa | grep polkit or dpkg -l | grep policykit)
2. Prioritize patching for: domain controllers, database servers, payment systems, and critical infrastructure
3. Implement temporary access controls: restrict local user access, disable unnecessary user accounts, enforce strong SSH key-based authentication
PATCHING GUIDANCE:
1. Red Hat/CentOS: yum update polkit or dnf update polkit
2. Debian/Ubuntu: apt-get update && apt-get install policykit-1
3. Verify patch: pkexec --version (should show patched version)
4. Restart affected services and reboot systems if required
COMPENSATING CONTROLS (if immediate patching delayed):
1. Remove execute permissions from pkexec: chmod 000 /usr/bin/pkexec (if not required)
2. Implement AppArmor/SELinux profiles to restrict pkexec execution
3. Monitor and log all pkexec execution attempts
4. Restrict sudo access and implement privilege escalation auditing
DETECTION RULES:
1. Monitor for pkexec process execution with unusual arguments
2. Alert on any pkexec execution from non-standard user accounts
3. Log all privilege escalation attempts via auditd: auditctl -w /usr/bin/pkexec -p x
4. Search logs for segmentation faults or memory access violations related to polkit
الإجراءات الفورية:
1. تحديد جميع الأنظمة التي تعمل بـ Polkit (تحقق: rpm -qa | grep polkit أو dpkg -l | grep policykit)
2. إعطاء الأولوية لتصحيح: متحكمات المجال وخوادم قواعد البيانات والأنظمة المالية والبنية التحتية الحرجة
3. تطبيق ضوابط وصول مؤقتة: تقييد وصول المستخدمين المحليين وتعطيل حسابات المستخدمين غير الضرورية وفرض المصادقة القائمة على مفاتيح SSH
إرشادات التصحيح:
1. Red Hat/CentOS: yum update polkit أو dnf update polkit
2. Debian/Ubuntu: apt-get update && apt-get install policykit-1
3. التحقق من التصحيح: pkexec --version (يجب أن يظهر الإصدار المصحح)
4. إعادة تشغيل الخدمات المتأثرة وإعادة تشغيل الأنظمة إذا لزم الأمر
الضوابط البديلة (إذا تأخر التصحيح الفوري):
1. إزالة أذونات التنفيذ من pkexec: chmod 000 /usr/bin/pkexec (إذا لم تكن مطلوبة)
2. تطبيق ملفات تعريف AppArmor/SELinux لتقييد تنفيذ pkexec
3. مراقبة وتسجيل جميع محاولات تنفيذ pkexec
4. تقييد وصول sudo وتطبيق تدقيق تصعيد الامتيازات
قواعد الكشف:
1. مراقبة تنفيذ عملية pkexec بحجج غير عادية
2. التنبيه على أي تنفيذ pkexec من حسابات مستخدمين غير قياسية
3. تسجيل جميع محاولات تصعيد الامتيازات عبر auditd: auditctl -w /usr/bin/pkexec -p x
4. البحث في السجلات عن أخطاء التجزئة أو انتهاكات الوصول إلى الذاكرة المتعلقة بـ polkit