{"id":105785,"date":"2022-12-02T15:36:49","date_gmt":"2022-12-02T13:36:49","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/root-uyazvimost-v-instrumentarii-upravleniya-paketami-snap"},"modified":"2022-12-02T15:36:49","modified_gmt":"2022-12-02T13:36:49","slug":"root-uyazvimost-v-instrumentarii-upravleniya-paketami-snap","status":"publish","type":"post","link":"https:\/\/prohoster.info\/da\/blog\/news\/root-uyazvimost-v-instrumentarii-upravleniya-paketami-snap","title":{"rendered":"Root-s\u00e5rbarhed i Snap-pakkestyringsv\u00e6rkt\u00f8jet.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Qualys har identificeret en tredje alvorlig s\u00e5rbarhed (CVE-2022-3328) i v\u00e6rkt\u00f8jet snap-confine, som leveres med SUID root-flaget og kaldes af snapd-processen for at danne det udf\u00f8relsesmilj\u00f8, som applikationer distribueres i via selvst\u00e6ndige pakker i snap-format. S\u00e5rbarheden giver en lokal, ikke-privilegeret bruger mulighed for at udf\u00f8re kode med root-rettigheder i standard Ubuntu-konfigurationen. Problemet er blevet rettet i versionen snapd 2.57.6. Updates er blevet udgivet for alle underst\u00f8ttede Ubuntu-versioner.    <\/p>\n<p>Det er interessant, at den aktuelle s\u00e5rbarhed blev indf\u00f8rt som en del af rettelsen af en lignende s\u00e5rbarhed i snap-confine fra februar. Forskere lykkedes med at udarbejde et funktionelt exploit, der giver root-adgang i Ubuntu Server 22.04, og i denne s\u00e5rbarhed er der ogs\u00e5 to s\u00e5rbarheder i multipathd-processen (CVE-2022-41974, CVE-2022-41973), relateret til omg\u00e5else af adgangskontrol ved overf\u00f8rsel af privilegerede kommandoer og usikker h\u00e5ndtering af symbolske links.    <\/p>\n<p>S\u00e5rbarheden i snap-confine skyldes en kapl\u00f8bssituation i funktionen must_mkdir_and_open_with_perms(), der blev tilf\u00f8jet for at beskytte mod at kataloget \/tmp\/snap.$SNAP_NAME bliver \u00e6ndret til et symbolsk link efter ejerkontrollen, men f\u00f8r kaldet til systemopkaldet mount for bind-mounting af kataloger til snap-pakken. Den tilf\u00f8jede beskyttelse bestod i at omd\u00f8be kataloget \/tmp\/snap.$SNAP_NAME til et andet katalog i \/tmp med et tilf\u00e6ldigt navn, hvis det eksisterer og ikke tilh\u00f8rer brugeren root.     <\/p>\n<p>Under brugen af omd\u00f8bningsoperationen af kataloget \/tmp\/snap.$SNAP_NAME udnyttede forskerne, at snap-confine ogs\u00e5 opretter kataloget \/tmp\/snap.rootfs_XXXXXX for roden af indholdet i snap-pakken. Delen &#171;XXXXXX&#187; i navnet v\u00e6lges tilf\u00e6ldigt ved hj\u00e6lp af mkdtemp(), men pakken med navnet &#171;rootfs_XXXXXX&#187; kan best\u00e5 kontrollen i funktionen sc_instance_name_validate (dvs. ideen er, at navnet $SNAP_NAME f\u00e5r v\u00e6rdien &#171;rootfs_XXXXXX&#187;, og s\u00e5 vil omd\u00f8bningsoperationen f\u00f8re til overskrivning af kataloget \/tmp\/snap.rootfs_XXXXXX med roden af snap).     <\/p>\n<p>For simultaneous use of \/tmp\/snap.rootfs_XXXXXX and renaming \/tmp\/snap.$SNAP_NAME, two instances of snap-confine were launched. As soon as the first instance created \/tmp\/snap.rootfs_XXXXXX, the process was blocked and the second instance with the package name rootfs_XXXXXX was started, causing the temporary directory \/tmp\/snap.$SNAP_NAME of the second instance to become the root directory \/tmp\/snap.rootfs_XXXXXX of the first. Immediately after performing the renaming, the second instance crashed, and \/tmp\/snap.rootfs_XXXXXX was replaced with a race condition manipulation, as seen in the February vulnerability exploitation. After the replacement, execution blocking was lifted from the first instance, allowing attackers full control over the root directory of the snap.     <\/p>\n<p>At the final stage, a symbolic link \/tmp\/snap.rootfs_XXXXXX\/tmp was created, which was used by the function sc_bootstrap_mount_namespace() for bind-mounting the writable real directory \/tmp into any FS directory, as the mount() call follows symbolic links before mounting. Such mounting is blocked by AppArmor restrictions, but to bypass this block, two auxiliary vulnerabilities in multipathd were exploited.<br \/>\n<br \/>Kilde: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=58242\">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 \u0442\u0440\u0435\u0442\u044c\u044e \u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443 \u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c (CVE-2022-3328) \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, \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\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\u044c \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\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 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Ubuntu \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u0432\u044b\u043f\u0443\u0441\u043a\u0435 [&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-105785","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 \u0442\u0440\u0435\u0442\u044c\u044e \u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443 \u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c (CVE-2022-3328) \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.\" \/>\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\/da\/blog\/news\/root-uyazvimost-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=\"da_DK\" \/>\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\udd47Root-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \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 \u0442\u0440\u0435\u0442\u044c\u044e \u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443 \u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c (CVE-2022-3328) \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.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/da\/blog\/news\/root-uyazvimost-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-12-02T13:36:49+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-12-02T13:36:49+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\udd47Root vulnerability in the Snap package management toolkit | ProHoster","description":"The company Qualys identified a third dangerous vulnerability of the year (CVE-2022-3328) in the snap-confine utility, supplied with the SUID root flag and called by the snapd process to form the execution environment for.","canonical_url":"https:\/\/prohoster.info\/da\/blog\/news\/root-uyazvimost-v-instrumentarii-upravleniya-paketami-snap","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"da_DK","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\udd47Root-\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \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 \u0442\u0440\u0435\u0442\u044c\u044e \u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443 \u043e\u043f\u0430\u0441\u043d\u0443\u044e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c (CVE-2022-3328) \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.","og:url":"https:\/\/prohoster.info\/da\/blog\/news\/root-uyazvimost-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-12-02T13:36:49+00:00","article:modified_time":"2022-12-02T13:36:49+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/105785","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/comments?post=105785"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/posts\/105785\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/media?parent=105785"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/categories?post=105785"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/da\/wp-json\/wp\/v2\/tags?post=105785"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}