
Salt security backports for CVE-2020-11651 & CVE-2020-11652
पिछले संस्करणों के लिए आधिकारिक पैच यहाँ अनुरोध किए जा सकते हैं: https://www.saltstack.com/lp/request-patch-april-2020/
⚠ यहाँ के पैच कस्टम हैं, और आधिकारिक पैच से भिन्न हो सकते हैं ⚠
इस रिपॉजिटरी में पैच निम्नलिखित CVE को संबोधित करते हैं:
इसके अतिरिक्त निम्नलिखित बगफिक्स शामिल हैं:
_minion_runner -> minion_runner। देखें: https://docs.saltstack.com/en/latest/topics/releases/3000.2.html#known-issue_find_file_and_stat -> _find_hash_and_stat। देखें https://github.com/rossengeorgiev/salt-security-backports/issues/1run_func हटानाimport salt.utils.verifyउपरोक्त सुधार SaltStack के नवीनतम रिलीज में शामिल हैं, विशेष रूप से v2019.2.5 और v3000.3।
जांच स्क्रिप्ट आपके सॉल्ट-मास्टर पर root के रूप में स्थानीय रूप से चलाई जानी चाहिए
python salt-cve-check.py
सॉल्ट 2017.7.8 के लिए उदाहरण आउटपुट:
[+] Salt version: 2017.7.8
[ ] This version of salt is vulnerable! Check results below
[+] Checking salt-master (127.0.0.1:4506) status... ONLINE
[+] Checking if vulnerable to CVE-2020-11651... YES
[+] Checking if vulnerable to CVE-2020-11652 (read_token)... YES
[+] Checking if vulnerable to CVE-2020-11652 (read)... YES
[+] Checking if vulnerable to CVE-2020-11652 (write1)... YES
[+] Checking if vulnerable to CVE-2020-11652 (write2)... YES
# locate the salt package directory (use python3 if necessary)
python -c "import imp; print(imp.find_module('salt')[1])"
# in my case: /usr/lib/python2.7/dist-packages/salt
# apply patches
# (adding -b flag will backup file before modifications at same path with .orig suffix)
# (patch can be reversed running the same command with -R flag)
patch -p2 -d /usr/lib/python2.7/dist-packages/salt < 2017.7.8_CVE-2020-11651.patch
patch -p2 -d /usr/lib/python2.7/dist-packages/salt < 2017.7.8_CVE-2020-11652.patch
# restart salt-master
systemctl restart salt-master
# or
service salt-master restart
जांच स्क्रिप्ट फिर से चलाएं:
user@salt # python salt-cve-check.py
[+] Salt version: 2017.7.8
[ ] This version of salt is vulnerable! Check results below
[+] Checking salt-master (127.0.0.1:4506) status... ONLINE
[+] Checking if vulnerable to CVE-2020-11651... NO
[+] Checking if vulnerable to CVE-2020-11652 (read_token)... NO
[+] Checking if vulnerable to CVE-2020-11652 (read)... NO
[+] Checking if vulnerable to CVE-2020-11652 (write1)... NO
[+] Checking if vulnerable to CVE-2020-11652 (write2)... NO