¡¾Îó²îͨ¸æ¡¿Ubuntu needrestartȨÏÞÌáÉýÎó²î£¨CVE-2024-48990£©
Ðû²¼Ê±¼ä 2024-11-21
Ò»¡¢Îó²î¸ÅÊö
Îó²îÃû³Æ | Ubuntu needrestartȨÏÞÌáÉýÎó²î | ||
CVE ID | CVE-2024-48990 | ||
Îó²îÀàÐÍ | LPE | ·¢Ã÷ʱ¼ä | 2024-11-21 |
Îó²îÆÀ·Ö | 7.8 | Îó²îÆ·¼¶ | ¸ßΣ |
¹¥»÷ÏòÁ¿ | ÍâµØ | ËùÐèȨÏÞ | µÍ |
ʹÓÃÄÑ¶È | µÍ | Óû§½»»¥ | ÎÞ |
PoC/EXP | δ¹ûÕæ | ÔÚҰʹÓà | δ·¢Ã÷ |
needrestart ÊÇUbuntu ºÍÆäËû»ùÓÚ Debian µÄ Linux ¿¯ÐаæÖг£ÓõÄÒ»¸ö¹¤¾ß£¬Ö÷ÒªÓÃÓÚ¼ì²âϵͳÖÐÊÇ·ñÓÐÐèÒªÖØÆôµÄ·þÎñ»òÄÚºËÄ£¿é¡£ËüÔÚÈí¼þ°ü¸üкóÔËÐУ¬×ÊÖúÖÎÀíԱʶ±ðÄÄЩ·þÎñ»òÀú³ÌÐèÒªÖØÐÂÆô¶¯ÒÔʹ¸üÐÂÉúЧ¡£
2024Äê11ÔÂ21ÈÕ£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø¼¯ÍÅVSRC¼à²âµ½Ubuntu needrestart°üÖб£´æ¶à¸öÍâµØȨÏÞÌáÉýÎó²î£¬¶ÔÄ¿µÄϵͳ¾ßÓÐÍâµØ»á¼ûȨÏ޵Ĺ¥»÷Õß¿ÉʹÓÃÕâЩÎó²îÔÚÎÞÐèÓû§½»»¥µÄÇéÐÎϽ«È¨ÏÞÌáÉýµ½root£¬ÏÖÔÚÕâЩÎó²îµÄÊÖÒÕϸ½ÚÒѹûÕ棬ÏêÇéÈçÏ£º
CVE-2024-48990£ºNeedrestart ʹÓôÓÕýÔÚÔËÐеÄÀú³ÌÖÐÌáÈ¡µÄ PYTHONPATH ÇéÐαäÁ¿Ö´ÐÐ Python Ú¹ÊÍÆ÷£¬ÈôÊÇÍâµØ¹¥»÷Õß¿ØÖƸñäÁ¿£¬¿ÉÒÔͨ¹ýÖ²Èë¶ñÒâ¹²Ïí¿âÔÚ Python ³õʼ»¯Ê±´úÒÔ root Éí·ÝÖ´ÐÐí§Òâ´úÂë¡£
CVE-2024-48992£ºneedrestart ʹÓÃµÄ Ruby Ú¹ÊÍÆ÷ÔÚ´¦Öóͷ£¹¥»÷Õß¿ØÖÆµÄ RUBYLIB ÇéÐαäÁ¿Ê±±£´æÎó²î£¬ÔÊÐíÍâµØ¹¥»÷Õßͨ¹ýÏòÀú³Ì×¢Èë¶ñÒâ¿âÒÔ root Éí·ÝÖ´ÐÐí§Òâ Ruby ´úÂë¡£
CVE-2024-48991£ºneedrestart ÖеľºÕùÌõ¼þÎó²îÔÊÐíÍâµØ¹¥»÷ÕßÓöñÒâ¿ÉÖ´ÐÐÎļþÌæ»»ÕýÔÚÑéÖ¤µÄ Python Ú¹ÊÍÆ÷¶þ½øÖÆÎļþ£¬ÓÕÆ needrestartÔËÐÐÆäα Python Ú¹ÊÍÆ÷£¬´Ó¶øÒÔ root Éí·ÝÖ´ÐÐí§Òâ´úÂë¡£
CVE-2024-10224/ CVE-2024-11003£ºModule::ScanDeps Perl Ä£¿éÓÃÓÚÆÊÎöÒÀÀµ¹Øϵ£¬ËüÔÊÐíÓû§Í¨¹ý open() ŲÓÃÍⲿÎļþ»òÖ´ÐÐÏÂÁÓÉÓÚËü¶ÔÊäÈëȱ·¦ÑÏ¿áÑéÖ¤£¬¹¥»÷Õß¿ÉÒÔÌṩ¶ñÒâÊäÈ룺ʹÓùܵÀ·ûºÅ£¨ÀýÈ罫¡°commands|¡±×÷ΪÎļþÃûת´ï£©£¬»ò½«í§Òâ×Ö·û¹´×ª´ï¸ø À´ÔËÐÐí§Òâ shell ÏÂÁî»òPerl´úÂë¡£ÔÚ CVE-2024-11003 ÖУ¬needrestart ʹÓà Module::ScanDeps À´ÆÊÎöÒÀÀµÎļþ£¬ÈôÊÇ needrestart ÔÚÒÔ root ȨÏÞÔËÐÐʱ£¬¹ýʧµØ½«Óû§¿É¿ØµÄÊäÈ루ÀýÈçÎļþÃû£©×ª´ï¸ø Module::ScanDeps£¬¾Í»áÒÔ root ÌØȨ´¥·¢ CVE-2024-10224Îó²î¡£
¶þ¡¢Ó°Ïì¹æÄ£
ÊÜÓ°Ïì°ü°æ±¾
0.8 <= needrestart < 3.8
ÊÜÓ°ÏìUbuntu¿¯Ðаæ
ÊÜÓ°ÏìUbuntu°æ±¾ | ÊÜÓ°Ïì°üÃû | ÊÜÓ°Ïì°ü°æ±¾ |
Xenial (16.04) | needrestart | <= 2.6-1 |
libmodule-scandeps-perl | <= 1.20-1 | |
Bionic (18.04) | needrestart | <= 3.1-1ubuntu0.1 |
libmodule-scandeps-perl | <= 1.24-1 | |
Focal (20.04) | needrestart | <= 3.4-6ubuntu0.1 |
libmodule-scandeps-perl | <= 1.27-1 | |
Jammy (22.04) | needrestart | <= 3.5-5ubuntu2.1 |
libmodule-scandeps-perl | <= 1.31-1 | |
Noble (24.04) | needrestart | <= 3.6-7ubuntu4.1 |
libmodule-scandeps-perl | <= 1.35-1 | |
Oracular (24.10) | needrestart | <= 3.6-8ubuntu4 |
libmodule-scandeps-perl | < 1.35-1 |
×¢£ºJammy¡¢Noble ºÍ Oracular °æ±¾ÖÐneedrestart °üÊÇĬÈÏ×°Öõģ¬Òò´ËÕâЩ°æ±¾µÄ·þÎñÆ÷×°ÖûáÊܵ½Ó°Ïì¡£Ö»ÓÐÊÖ¶¯×°ÖÃÁË needrestart ºó£¬Jammy ֮ǰµÄ×ÀÃæ×°ÖúÍĬÈÏ Ubuntu Server ×°ÖòŻáÊܵ½Ó°Ïì¡£
Èý¡¢Çå¾²²½·¥
3.1 Éý¼¶°æ±¾
ÏÖÔÚÕâЩÎó²îÒѾÐÞ¸´£¬ÊÜÓ°ÏìÓû§¿É½«needrestart°ü¸üе½3.8»ò¸ü¸ß°æ±¾£¬UbuntuÓû§¿É½«ÊÜÓ°Ïì°üÉý¼¶µ½ÒÔÏÂÏìÓ¦°æ±¾£º
Ubuntu¿¯Ðаæ | ÐÞ¸´°ü°æ±¾ | ˵Ã÷ |
Ubuntu 24.10 | libmodule-scandeps-perl - 1.35-1ubuntu0.24.10.1 needrestart - 3.6-8ubuntu4.2 | / |
Ubuntu 24.04 | libmodule-scandeps-perl - 1.35-1ubuntu0.24.04.1 needrestart - 3.6-7ubuntu4.3 | / |
Ubuntu 22.04 | libmodule-scandeps-perl - 1.31-1ubuntu0.1 needrestart - 3.5-5ubuntu2.2 | / |
Ubuntu 20.04 | libmodule-scandeps-perl - 1.27-1ubuntu0.1~esm1 needrestart - 3.4-6ubuntu0.1+esm1 | ÊÊÓÃÓÚUbuntu Pro |
Ubuntu 18.04 | libmodule-scandeps-perl - 1.24-1ubuntu0.1~esm1 needrestart - 3.1-1ubuntu0.1+esm1 | ÊÊÓÃÓÚUbuntu Pro |
Ubuntu 16.04 | libmodule-scandeps-perl - 1.20-1ubuntu0.1~esm1 needrestart - 2.6-1ubuntu0.1~esm1 | ÊÊÓÃÓÚUbuntu Pro |
3.2 ÔÝʱ²½·¥
1.UbuntuϵͳÉϼì²éÊÇ·ñÊܵ½ÕâЩÎó²îÓ°Ïì¡£
ÔÚϵͳÉÏÔËÐÐÒÔÏÂÏÂÁî²¢½«ÁгöµÄ°æ±¾ÓëÉϱí¾ÙÐнÏÁ¿£º
apt list --installed | grep "^\(needrestart\|libmodule-scandeps-perl\)"
2.ÐÞ¸´²½·¥¡£
½¨ÒéÉý¼¶ËùÓÐÈí¼þ°ü£º
sudo apt update && sudo apt upgrade
ÈôÊDz»¿ÉÖ´Ðд˲Ù×÷£¬¿ÉÒÔÕë¶ÔÊÜÓ°ÏìµÄ×é¼þ¾ÙÐÐÒÔϲÙ×÷£º
sudo apt update && sudo apt install --only-upgrade needrestart libmodule-scandeps-perl
unattended-upgrades¹¦Ð§ÔÚUbuntu 16.04 LTS ¼°¸ü¸ß°æ±¾ÖÐĬÈÏÆôÓã¬ÈôÊÇÆôÓô˹¦Ð§£¬ÉÏÊö²¹¶¡½«ÔÚ¿ÉÓúó 24 СʱÄÚ×Ô¶¯Ó¦Óá£
3.»º½â²½·¥¡£
ÐÞ¸Ä/etc/needrestart/needrestart.conf ÎļþÒÔ½ûÓÃÚ¹ÊÍÆ÷ɨÃ蹦Ч£¬´Ó¶ø±ÜÃâÎó²î±»Ê¹Óãº
# Disable interpreter scanners.
$nrconf{interpscan} = 0;
3.3 ͨÓý¨Òé
l °´ÆÚ¸üÐÂϵͳ²¹¶¡£¬ïÔÌϵͳÎó²î£¬ÌáÉý·þÎñÆ÷µÄÇå¾²ÐÔ¡£
l ÔöǿϵͳºÍÍøÂçµÄ»á¼û¿ØÖÆ£¬Ð޸ķÀ»ðǽսÂÔ£¬¹Ø±Õ·ÇÐëÒªµÄÓ¦Óö˿ڻò·þÎñ£¬ïÔ̽«Î£ÏÕ·þÎñ£¨ÈçSSH¡¢RDPµÈ£©Ì»Â¶µ½¹«Íø£¬ïÔ̹¥»÷Ãæ¡£
l ʹÓÃÆóÒµ¼¶Çå¾²²úÆ·£¬ÌáÉýÆóÒµµÄÍøÂçÇå¾²ÐÔÄÜ¡£
l ÔöǿϵͳÓû§ºÍȨÏÞÖÎÀí£¬ÆôÓöàÒòËØÈÏÖ¤»úÖƺÍ×îСȨÏÞÔÔò£¬Óû§ºÍÈí¼þȨÏÞÓ¦¼á³ÖÔÚ×îµÍÏ޶ȡ£
l ÆôÓÃÇ¿ÃÜÂëÕ½ÂÔ²¢ÉèÖÃΪ°´ÆÚÐ޸ġ£
3.4 ²Î¿¼Á´½Ó
https://ubuntu.com/blog/needrestart-local-privilege-escalation
https://ubuntu.com/security/notices/USN-7117-1
https://www.qualys.com/2024/11/19/needrestart/needrestart.txt
ËÄ¡¢°æ±¾ÐÅÏ¢
°æ±¾ | ÈÕÆÚ | ±¸×¢ |
V1.0 | 2024-11-21 | Ê×´ÎÐû²¼ |
Îå¡¢¸½Â¼
5.1 ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø¼ò½é
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø½¨ÉèÓÚ1996Ä꣬ÊÇÓÉÁôÃÀ²©Ê¿ÑÏÍû¼ÑŮʿ½¨ÉèµÄ¡¢ÓµÓÐÍêÈ«×ÔÖ÷֪ʶ²úȨµÄÐÅÏ¢Çå¾²¸ß¿Æ¼¼ÆóÒµ¡£ÊǺ£ÄÚ×î¾ßʵÁ¦µÄÐÅÏ¢Çå¾²²úÆ·¡¢Çå¾²·þÎñ½â¾ö¼Æ»®µÄÁ캽ÆóÒµÖ®Ò»¡£
¹«Ë¾×ܲ¿Î»ÓÚ±±¾©ÊÐÖйشåÈí¼þÔ°ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø´óÏ㬹«Ë¾Ô±¹¤6000ÓàÈË£¬Ñз¢ÍŶÓ1200ÓàÈË, ÊÖÒÕ·þÎñÍŶÓ1300ÓàÈË¡£ÔÚÌìϸ÷Ê¡¡¢ÊС¢×ÔÖÎÇøÉèÁ¢·ÖÖ§»ú¹¹ÁùÊ®¶à¸ö£¬ÓµÓÐÁýÕÖÌìϵÄÏúÊÛϵͳ¡¢ÇþµÀϵͳºÍÊÖÒÕÖ§³Öϵͳ¡£¹«Ë¾ÓÚ2010Äê6ÔÂ23ÈÕÔÚÉîÛÚÖÐС°å¹ÒÅÆÉÏÊС££¨¹ÉƱ´úÂ룺002439£©
¶àÄêÀ´£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÖÂÁ¦ÓÚÌṩ¾ßÓйú¼Ê¾ºÕùÁ¦µÄ×ÔÖ÷Á¢ÒìµÄÇå¾²²úÆ·ºÍ×î¼Ñʵ¼ù·þÎñ£¬×ÊÖú¿Í»§ÖÜÈ«ÌáÉýÆäIT»ù´¡ÉèÊ©µÄÇå¾²ÐÔºÍÉú²úЧÄÜ£¬Îª´òÔìºÍÌáÉý¹ú¼Ê»¯µÄÃñ×åÐÅÏ¢Çå¾²¹¤ÒµÁì¾üÆ·Åƶø²»Ð¸Æ𾢡£
5.2 ¹ØÓÚÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÇå¾²Ó¦¼±ÏìÓ¦ÖÐÐÄÒÑÐû²¼1000¶à¸öÎó²îͨ¸æºÍΣº¦Ô¤¾¯£¬ÎÒÃǽ«Ò»Á¬¸ú×ÙÈ«Çò×îеÄÍøÂçÇå¾²ÊÂÎñºÍÎó²î£¬ÎªÆóÒµµÄÐÅÏ¢Çå¾²±£¼Ý»¤º½¡£
¹Ø×¢ÎÒÃÇ£º