{"id":103374,"date":"2022-02-18T03:37:22","date_gmt":"2022-02-18T01:37:22","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap"},"modified":"2022-02-18T03:37:22","modified_gmt":"2022-02-18T01:37:22","slug":"lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap","status":"publish","type":"post","link":"https:\/\/prohoster.info\/pt\/blog\/news\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap","title":{"rendered":"Vulnerabilidades locais de root no conjunto de ferramentas de gerenciamento de pacotes Snap","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>A Qualys descobriu duas vulnerabilidades (CVE-2021-44731, CVE-2021-44730) na ferramenta snap-confine, fornecida com a flag SUID root e chamada pelo processo snapd para criar o ambiente de execu\u00e7\u00e3o para aplicativos distribu\u00eddos em pacotes autossuficientes no formato snap. As vulnerabilidades permitem que um usu\u00e1rio local n\u00e3o privilegiado consiga executar c\u00f3digo com privil\u00e9gios de root no sistema. Os problemas foram corrigidos na atualiza\u00e7\u00e3o de hoje dos pacotes snapd para Ubuntu 21.10, 20.04 e 18.04.      <\/p>\n<p>A primeira vulnerabilidade (CVE-2021-44730) permite um ataque por meio da manipula\u00e7\u00e3o de links duros, mas requer a desativa\u00e7\u00e3o da prote\u00e7\u00e3o do sistema contra links duros (configurando sysctl fs.protected_hardlinks para 0). O problema \u00e9 causado pela verifica\u00e7\u00e3o incorreta do local dos arquivos execut\u00e1veis das ferramentas snap-update-ns e snap-discard-ns, executadas com privil\u00e9gios de root. O caminho para esses arquivos era calculado na fun\u00e7\u00e3o sc_open_snapd_tool() com base no seu pr\u00f3prio caminho de \/proc\/self\/exe, o que permite criar um link duro para snap-confine em seu pr\u00f3prio diret\u00f3rio e colocar nele suas vers\u00f5es das ferramentas snap-update-ns e snap-discard-ns. Ap\u00f3s a execu\u00e7\u00e3o via link duro, snap-confine com privil\u00e9gios de root iniciar\u00e1 os arquivos snap-update-ns e snap-discard-ns fornecidos pelo atacante a partir do diret\u00f3rio atual.      <\/p>\n<p>A segunda vulnerabilidade \u00e9 causada por uma condi\u00e7\u00e3o de corrida e pode ser explorada na configura\u00e7\u00e3o padr\u00e3o do Ubuntu Desktop. Para que o exploit funcione corretamente no Ubuntu Server, \u00e9 necess\u00e1rio escolher durante a instala\u00e7\u00e3o um dos pacotes da se\u00e7\u00e3o 'Featured Server Snaps'. A condi\u00e7\u00e3o de corrida se manifesta na fun\u00e7\u00e3o setup_private_mount(), chamada durante a prepara\u00e7\u00e3o do espa\u00e7o de nomes dos pontos de montagem para o pacote snap. Essa fun\u00e7\u00e3o cria um diret\u00f3rio tempor\u00e1rio '\/tmp\/snap.$SNAP_NAME\/tmp' ou utiliza um j\u00e1 existente para montar bind nele diret\u00f3rios do pacote no formato snap.     <\/p>\n<p>Como o nome do diret\u00f3rio tempor\u00e1rio \u00e9 previs\u00edvel, um atacante pode substituir seu conte\u00fado por um link simb\u00f3lico entre a verifica\u00e7\u00e3o do propriet\u00e1rio e a chamada do sistema mount. Por exemplo, \u00e9 poss\u00edvel criar um link simb\u00f3lico '\/tmp\/snap.lxd\/tmp' no diret\u00f3rio '\/tmp\/snap.lxd' que aponta para um diret\u00f3rio arbitr\u00e1rio, e a chamada mount() seguir\u00e1 o link simb\u00f3lico e montar\u00e1 o diret\u00f3rio no espa\u00e7o de nomes snap. Da mesma forma, \u00e9 poss\u00edvel montar seu conte\u00fado em '\/var\/lib' e, atrav\u00e9s da substitui\u00e7\u00e3o de '\/var\/lib\/snapd\/mount\/snap.snap-store.user-fstab', organizar a montagem do seu diret\u00f3rio '\/etc' no espa\u00e7o de nomes do pacote snap para carregar sua biblioteca com privil\u00e9gios de root, substituindo '\/etc\/ld.so.preload'.      <\/p>\n<p>Observa-se que a cria\u00e7\u00e3o de um exploit se revelou uma tarefa n\u00e3o trivial, uma vez que a utilidade snap-confine \u00e9 escrita em Go utilizando pr\u00e1ticas de programa\u00e7\u00e3o segura, possui prote\u00e7\u00e3o baseada em perfis AppArmor, filtra chamadas de sistema atrav\u00e9s do mecanismo seccomp e aplica namespaces para isolamento durante a montagem. No entanto, os pesquisadores conseguiram preparar um exploit funcional para obter privil\u00e9gios de root no sistema. O c\u00f3digo do exploit ser\u00e1 publicado em algumas semanas, ap\u00f3s os usu\u00e1rios instalarem as atualiza\u00e7\u00f5es fornecidas.<br \/>\n<br \/>Fonte: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=56717\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0432\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 (CVE-2021-44731, CVE-2021-44730) \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 snap-confine, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c SUID root \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c snapd \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0445 \u0432 \u0441\u0430\u043c\u043e\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u0430\u0445 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 snap. \u0423\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0435\u043f\u0440\u0438\u0432\u0438\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 root \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u044b \u0432 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 snapd \u0434\u043b\u044f Ubuntu 21.10, [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-103374","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0432\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 (CVE-2021-44731, CVE-2021-44730) \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 snap-confine, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c SUID root \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c snapd \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/pt\/blog\/news\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"pt_PT\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 root-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 Snap | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0432\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 (CVE-2021-44731, CVE-2021-44730) \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 snap-confine, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c SUID root \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c snapd \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/pt\/blog\/news\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2022-02-18T01:37:22+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-02-18T01:37:22+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Vulnerabilidades locais de root na ferramenta de gerenciamento de pacotes Snap | ProHoster","description":"A empresa Qualys identificou duas vulnerabilidades (CVE-2021-44731, CVE-2021-44730) na utilidade snap-confine, entregue com a flag SUID root e chamada pelo processo snapd para formar o ambiente de execu\u00e7\u00e3o para aplicativos.","canonical_url":"https:\/\/prohoster.info\/pt\/blog\/news\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"pt_PT","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 root-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0430\u043a\u0435\u0442\u0430\u043c\u0438 Snap | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Qualys \u0432\u044b\u044f\u0432\u0438\u043b\u0430 \u0434\u0432\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 (CVE-2021-44731, CVE-2021-44730) \u0432 \u0443\u0442\u0438\u043b\u0438\u0442\u0435 snap-confine, \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0439 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c SUID root \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c snapd \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.","og:url":"https:\/\/prohoster.info\/pt\/blog\/news\/lokalnye-root-uyazvimosti-v-instrumentarii-upravleniya-paketami-snap","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2022-02-18T01:37:22+00:00","article:modified_time":"2022-02-18T01:37:22+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"103374","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2022-02-18 01:37:39","updated":"2022-10-10 21:24:34","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/103374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/comments?post=103374"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/posts\/103374\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/media?parent=103374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/categories?post=103374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/pt\/wp-json\/wp\/v2\/tags?post=103374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}