¡¾Îó²îͨ¸æ¡¿runcÈÝÆ÷ÌÓÒÝÎó²î£¨CVE-2024-21626£©
Ðû²¼Ê±¼ä 2024-02-02
Ò»¡¢Îó²î¸ÅÊö
Îó²îÃû³Æ | runcÈÝÆ÷ÌÓÒÝÎó²î | ||
CVE ID | CVE-2024-21626 | ||
Îó²îÀàÐÍ | ÈÝÆ÷ÌÓÒÝ | ·¢Ã÷ʱ¼ä | 2024-02-01 |
Îó²îÆÀ·Ö | 8.6 | Îó²îÆ·¼¶ | ¸ßΣ |
¹¥»÷ÏòÁ¿ | ÍâµØ | ËùÐèȨÏÞ | ÎÞ |
ʹÓÃÄÑ¶È | µÍ | Óû§½»»¥ | ÐèÒª |
PoC/EXP | δ¹ûÕæ | ÔÚҰʹÓà | δ·¢Ã÷ |
2024Äê2ÔÂ1ÈÕ£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøVSRC¼à²âµ½»¥ÁªÍøÉÏÅû¶¶à¸ö½¹µãÈÝÆ÷»ù´¡ÉèÊ©×é¼þÖз¢Ã÷ÁË4¸öÎó²î£¨CVE-2024-21626¡¢CVE-2024-23651¡¢CVE-2024-23652 ºÍ CVE-2024-23653£©£¬ÕâЩÎó²î±»³ÆΪLeaky Vessels£¬Ó°ÏìÁËRuncºÍBuildKit£¬ÍþвÕß¿ÉʹÓÃÕâЩÎó²î»ñµÃ¶Ôµ×²ãÖ÷»ú²Ù×÷ϵͳµÄδÊÚȨ»á¼û¡£
runc ÊÇÒ»ÖÖ CLI ¹¤¾ß£¬ÓÃÓÚƾ֤ OCI ¹æ·¶ÔÚ Linux ÉÏÌìÉúºÍÔËÐÐÈÝÆ÷¡£runcµÄʹÓúÜÊÇÎÞа£¬¿ÉÒÔÓëÖÖÖÖÈÝÆ÷¹¤¾ßÇ徲̨¼¯³É£¬ÈçDocker¡¢KubernetesµÈ¡£ÆäÖÐCVE-2024-21626Éæ¼°runc£¬runc 1.1.11¼°Ö®Ç°°æ±¾ÖУ¬ÓÉÓÚÄÚ²¿ÎļþÐÎò·û×ß©£¬ÍâµØÍþвÕß¿ÉÒÔͨ¹ý¶àÖÖ·½·¨ÊµÏÖÈÝÆ÷ÌÓÒÝ£ºÍþвÕß¿ÉÒÔͨ¹ýʹÐÂÌìÉúµÄÈÝÆ÷Àú³Ì£¨À´×Ôrunc exec£©ÔÚÖ÷»úÎļþϵͳÃüÃû¿Õ¼äÖÐÓµÓÐÒ»¸öÊÂÇéĿ¼£¬»òÓÕʹÌØȨÓû§ÔËÐжñÒâ¾µÏñ²¢ÔÊÐíÈÝÆ÷Àú³Ìͨ¹ý runc run »á¼ûÖ÷»úÎļþϵͳ£¬´Ó¶ø»ñµÃ¶ÔÖ÷»úÎļþϵͳµÄ»á¼ûȨÏÞ¡£ÕâЩ¹¥»÷»¹¿ÉÓÃÓÚÁýÕÖ°ëí§ÒâÖ÷»ú¶þ½øÖÆÎļþ£¬´Ó¶øʵÏÖÈÝÆ÷ÌÓÒÝ¡£
BuildKit ÊÇDocker¹Ù·½ÉçÇøÍƳöµÄÏÂÒ»´ú¾µÏñ¹¹½¨×é¼þ£¬¿ÉÒÔÔ½·¢¿ìËÙ¡¢ÓÐÓá¢Çå¾²µØ¹¹½¨docker ¾µÏñ¡£MobyÊÇDocker½¨ÉèµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬Ö¼ÔÚʵÏÖÈí¼þÈÝÆ÷»¯¡£BuildKiºÍMobyÖл¹±£´æÈç϶à¸öÎó²î£º
CVE-2024-23651£º¸ÃÎó²îµÄCVSSÆÀ·ÖΪ8.7£¬ÔÚ BuildKit <= v0.12.4 ÖУ¬²¢ÐÐÔËÐеÄÁ½¸ö¶ñÒâ¹¹½¨°ì·¨Óë×Ó·¾¶¹²ÏíÏàͬµÄ»º´æ¹ÒÔØ¿ÉÄܻᵼÖ¾ºÕùÌõ¼þ£¬´Ó¶øµ¼Ö¹¹½¨ÈÝÆ÷¿ÉÒÔ»á¼ûÖ÷»úϵͳÖеÄÎļþ¡£Ö»Óе±Óû§ÊÔͼ¹¹½¨¶ñÒâÏîÄ¿µÄDockerfileʱ£¬²Å»á±¬·¢ÕâÖÖÇéÐΡ£
CVE-2024-23652£º¸ÃÎó²îµÄCVSSÆÀ·ÖΪ10.0£¬ÔÚ BuildKit <= v0.12.4 ÖУ¬Ê¹Óà RUN --mount µÄ¶ñÒâ BuildKit Ç°¶Ë»ò Dockerfile ¿ÉÄÜ»áÓÕÆɾ³ýΪ¹ÒÔص㽨ÉèµÄ¿ÕÎļþµÄ¹¦Ð§£¬´Ó¶ø´ÓÖ÷»úϵͳÖÐɾ³ýÈÝÆ÷ÍâµÄÎļþ¡£Ö»Óе±Óû§Ê¹ÓöñÒâ Dockerfile ʱ²Å»á±¬·¢ÕâÖÖÇéÐΡ£
CVE-2024-23653£º¸ÃÎó²îµÄCVSSÆÀ·ÖΪ9.8¡£³ýÁË×÷Ϊ¹¹½¨°ì·¨ÔËÐÐÈÝÆ÷Í⣬BuildKit »¹ÌṩÁË»ùÓÚ¹¹½¨¾µÏñÔËÐн»»¥Ê½ÈÝÆ÷µÄ API¡£ÔÚ BuildKit <= v0.12.4 ÖУ¬¿ÉÒÔʹÓÃÕâЩ API À´ÒªÇó BuildKit ÒÔÌáÉýµÄȨÏÞÔËÐÐÈÝÆ÷¡£Í¨³££¬Ö»ÓÐÔÚ buildkitd ÉèÖÃÆôÓÃÁË security.insecure ȨÏÞ£¬²¢ÇÒ³õʼ»¯¹¹½¨ÇëÇóµÄÓû§ÔÊÐíµÄÇéÐÎÏ£¬²ÅÔÊÐíÔËÐдËÀàÈÝÆ÷¡£
CVE-2024-23650£¨ÖÐΣ£©£ºÔÚ BuildKit <= v0.12.4 ÖУ¬¶ñÒâ BuildKit ¿Í»§¶Ë»òÇ°¶Ë¿ÉÖÆ×÷Ò»¸öÇëÇ󣬵¼Ö BuildKit ÊØ»¤Àú³ÌÒò¿Ö»Å¶øÍ߽⡣
CVE-2024-24557£¨ÖÐΣ£©£ºÔÚ Moby <= v25.0.1 ºÍ <= v24.0.8 ÖУ¬ÈôÊǾµÏñÊÇÖØй¹½¨µÄ£¬¾µäµÄ¹¹½¨Æ÷»º´æϵͳºÜÈÝÒ×·ºÆ𻺴æÖж¾¡£
¶þ¡¢Ó°Ïì¹æÄ£
Runc <= 1.1.11
BuildKit <= 0.12.4
Moby (Docker Engine)<= 25.0.1 ºÍ<= 24.0.8
Docker Desktop <= 4.27.0
Containerd < 1.6.28
Èý¡¢Çå¾²²½·¥
3.1 Éý¼¶°æ±¾
ÏÖÔÚ²¿·ÖÈÝÆ÷»ù´¡ÉèÊ©ÖÐÒѾÐÞ¸´ÁËÕâЩÎó²î£¬ÊÜÓ°ÏìÓû§¿ÉÉý¼¶µ½ÒÔÏ°汾£º
Runc >= 1.1.12
BuildKit >= 0.12.5
Moby (Docker Engine) >= 25.0.2 ºÍ >= 24.0.9
Docker Desktop >= 4.27.1
Containerd >= 1.6.28
ÏÂÔØÁ´½Ó£º
https://snyk.io/blog/leaky-vessels-docker-runc-container-breakout-vulnerabilities/
3.2 ÔÝʱ²½·¥
ÈçÎÞ·¨Éý¼¶µ½ÐÞ¸´°æ±¾£¬¿É×ñÕÕÒÔÏÂ×î¼Ñʵ¼ùÀ´½µµÍΣº¦£º
l ½öʹÓÃÊÜÐÅÍÐµÄ Docker ¾µÏñ£¨ÀýÈçDocker ¹Ù·½¾µÏñ£©¡£
l ²»Òª´Ó²»ÊÜÐÅÍеÄȪԴ»ò²»ÊÜÐÅÍÐµÄ Dockerfile ¹¹½¨ Docker ¾µÏñ¡£
l ÈôÊÇÊÇʹÓà Docker Desktop µÄ Docker Business ¿Í»§£¬²¢ÇÒÎÞ·¨ÔÚ v4.27.1 Ðû²¼ºóÁ¬Ã¦¸üе½¸Ã°æ±¾£¬ÇëÈ·±£ÆôÓà Hardened Docker Desktop ¹¦Ð§£¬ÀýÈ磺
¨¹ ÔöÇ¿µÄÈÝÆ÷¸ôÀ루Enhanced Container Isolation£©£¬¿ÉÔÚ´Ó¶ñÒâ¾µÏñÔËÐÐÈÝÆ÷µÄÇéÐÎϼõÇáCVE-2024-21626µÄÓ°Ïì¡£
¨¹ ¾µÏñ»á¼ûÖÎÀíºÍ×¢²á±í»á¼ûÖÎÀí£¬¿ÉÈÃÆóÒµ¿ØÖÆÓû§¿ÉÒÔ»á¼ûÄÄЩ¾µÏñºÍ´æ´¢¿â¡£
l ¹ØÓÚ CVE-2024-23650¡¢CVE-2024-23651¡¢CVE-2024-23652 ºÍ CVE-2024-23653£¬Çë×èֹʹÓÃÀ´×Ô²»ÊÜÐÅÍÐȪԴµÄBuildKit Ç°¶Ë¡£Ç°¶Ë¾µÏñͨ³£ÔÚ Dockerfile µÄ #syntax ÐÐÖÐÖ¸¶¨£¬»òÔÚʹÓà buildctl build ÏÂÁîʱʹÓà --frontend ±ê¼ÇÖ¸¶¨¡£
l Òª»º½â CVE-2024-24557 µÄÓ°Ï죬ÇëÈ·±£ÔÚ¹¹½¨¾µÏñʱʹÓà BuildKit »ò½ûÓûº´æ¡£
3.3 ͨÓý¨Òé
l °´ÆÚ¸üÐÂϵͳ²¹¶¡£¬ïÔÌϵͳÎó²î£¬ÌáÉý·þÎñÆ÷µÄÇå¾²ÐÔ¡£
l ÔöǿϵͳºÍÍøÂçµÄ»á¼û¿ØÖÆ£¬Ð޸ķÀ»ðǽսÂÔ£¬¹Ø±Õ·ÇÐëÒªµÄÓ¦Óö˿ڻò·þÎñ£¬ïÔ̽«Î£ÏÕ·þÎñ£¨ÈçSSH¡¢RDPµÈ£©Ì»Â¶µ½¹«Íø£¬ïÔ̹¥»÷Ãæ¡£
l ʹÓÃÆóÒµ¼¶Çå¾²²úÆ·£¬ÌáÉýÆóÒµµÄÍøÂçÇå¾²ÐÔÄÜ¡£
l ÔöǿϵͳÓû§ºÍȨÏÞÖÎÀí£¬ÆôÓöàÒòËØÈÏÖ¤»úÖƺÍ×îСȨÏÞÔÔò£¬Óû§ºÍÈí¼þȨÏÞÓ¦¼á³ÖÔÚ×îµÍÏ޶ȡ£
l ÆôÓÃÇ¿ÃÜÂëÕ½ÂÔ²¢ÉèÖÃΪ°´ÆÚÐ޸ġ£
3.4 ²Î¿¼Á´½Ó
https://github.com/opencontainers/runc/security/advisories/GHSA-xr7r-f8xq-vfvv
https://snyk.io/blog/leaky-vessels-docker-runc-container-breakout-vulnerabilities/
https://snyk.io/blog/cve-2024-21626-runc-process-cwd-container-breakout/
https://www.docker.com/blog/docker-security-advisory-multiple-vulnerabilities-in-runc-buildkit-and-moby/
ËÄ¡¢°æ±¾ÐÅÏ¢
°æ±¾ | ÈÕÆÚ | ±¸×¢ |
V1.0 | 2024-02-02 | Ê×´ÎÐû²¼ |
Îå¡¢¸½Â¼
5.1 ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø¼ò½é
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø½¨ÉèÓÚ1996Ä꣬ÊÇÓÉÁôÃÀ²©Ê¿ÑÏÍû¼ÑŮʿ½¨ÉèµÄ¡¢ÓµÓÐÍêÈ«×ÔÖ÷֪ʶ²úȨµÄÐÅÏ¢Çå¾²¸ß¿Æ¼¼ÆóÒµ¡£ÊǺ£ÄÚ×î¾ßʵÁ¦µÄÐÅÏ¢Çå¾²²úÆ·¡¢Çå¾²·þÎñ½â¾ö¼Æ»®µÄÁ캽ÆóÒµÖ®Ò»¡£
¹«Ë¾×ܲ¿Î»ÓÚ±±¾©ÊÐÖйشåÈí¼þÔ°ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø´óÏ㬹«Ë¾Ô±¹¤6000ÓàÈË£¬Ñз¢ÍŶÓ1200ÓàÈË, ÊÖÒÕ·þÎñÍŶÓ1300ÓàÈË¡£ÔÚÌìϸ÷Ê¡¡¢ÊС¢×ÔÖÎÇøÉèÁ¢·ÖÖ§»ú¹¹ÁùÊ®¶à¸ö£¬ÓµÓÐÁýÕÖÌìϵÄÏúÊÛϵͳ¡¢ÇþµÀϵͳºÍÊÖÒÕÖ§³Öϵͳ¡£¹«Ë¾ÓÚ2010Äê6ÔÂ23ÈÕÔÚÉîÛÚÖÐС°å¹ÒÅÆÉÏÊС££¨¹ÉƱ´úÂ룺002439£©
¶àÄêÀ´£¬ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÖÂÁ¦ÓÚÌṩ¾ßÓйú¼Ê¾ºÕùÁ¦µÄ×ÔÖ÷Á¢ÒìµÄÇå¾²²úÆ·ºÍ×î¼Ñʵ¼ù·þÎñ£¬×ÊÖú¿Í»§ÖÜÈ«ÌáÉýÆäIT»ù´¡ÉèÊ©µÄÇå¾²ÐÔºÍÉú²úЧÄÜ£¬Îª´òÔìºÍÌáÉý¹ú¼Ê»¯µÄÃñ×åÐÅÏ¢Çå¾²¹¤ÒµÁì¾üÆ·Åƶø²»Ð¸Æ𾢡£
5.2 ¹ØÓÚÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍø
ÓÅ·¢¹ú¼ÊÍøÕ¾¹ÙÍøÇå¾²Ó¦¼±ÏìÓ¦ÖÐÐÄÒÑÐû²¼1000¶à¸öÎó²îͨ¸æºÍΣº¦Ô¤¾¯£¬ÎÒÃǽ«Ò»Á¬¸ú×ÙÈ«Çò×îеÄÍøÂçÇå¾²ÊÂÎñºÍÎó²î£¬ÎªÆóÒµµÄÐÅÏ¢Çå¾²±£¼Ý»¤º½¡£
¹Ø×¢ÎÒÃÇ£º