{"id":183605,"date":"2026-10-05T10:54:21","date_gmt":"2026-10-05T08:54:21","guid":{"rendered":"https:\/\/prohoster.info\/blog\/news\/teo-de-raadt-predlozhil-izmeneniya-dlya-ogranicheniya-dostupa-k-fs-cherez-funkcziyu-openat"},"modified":"2026-10-05T10:54:25","modified_gmt":"2026-10-05T08:54:25","slug":"theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","status":"publish","type":"post","link":"https:\/\/prohoster.info\/et\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","title":{"rendered":"Teo de Raadt pakkus v\u00e4lja muudatused, et piirata juurdep\u00e4\u00e4su FS-ile openat funktsiooni kaudu","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Theo de Raadt on soovitanud lisada OpenBSD-sse uue mehhanismi r\u00fcnde pinna v\u00e4hendamiseks, mille on ellu viidud s\u00fcsteemi kutsumise openat laiendamise kaudu. Patchid, mis sisaldavad openat ja open t\u00e4iendavaid lippude rakendusi, mis piiravad v\u00f5imalust minna \u00fclemistesse kataloogidesse l\u00e4bi \u00ab\/..\u00bb ja p\u00f6\u00f6rdumist absoluutsete teede poole, on ette valmistatud tuumale, libc-le ja m\u00f5nedele rakendustele p\u00f5hikogus. Muudatused pole veel lisatud OpenBSD-currenti ja need on arutelu all arendajate seas.    <\/p>\n<p>Openat(2) s\u00fcsteemi kutsete perekond t\u00f6\u00f6tab nagu open(2), v\u00e4lja arvatud see, et kui parameetris \u00abpath\u00bb on m\u00e4\u00e4ratud suhteline tee, siis avatud fail m\u00e4\u00e4ratakse faili descriptoriga \u00abfd\u00bb seotud katalooge osas, mitte praeguse t\u00f6\u00f6 katalooge osas. Kui openat-ile edastada absoluutne tee, n\u00e4iteks: int dirfd = open(\u00ab\/tmp\u00bb, O_RDONLY | O_DIRECTORY); int hfd = openat(dirfd, \u00ab\/etc\/hosts\u00bb, O_RDONLY);    <\/p>\n<p>funktsioon openat() ignoreerib \u00abdirfd\u00bb ja seet\u00f5ttu t\u00f6\u00f6deldakse absoluutset teed tavalise viisi j\u00e4rgi.    <\/p>\n<p>Therefore, replacing open() with openat() does not enhance program security by itself. Such a call may speed up path parsing but does not restrict access to the filesystem. Flags that prohibit absolute paths (for example, RESOLVE_BENEATH and\/or RESOLVE_IN_ROOT for openat2 in Linux) do not guarantee protection: the programmer must add them to all relevant calls, and if the process control is compromised, the attacker may take advantage of other methods to open files.    <\/p>\n<p>During the work on the openrsync utility, Theo found a need to limit its ability to traverse the filesystem, but doing so with the unveil() and pledge() functions proved impossible. Thus, the idea of a mechanism similar to openat() arose, but with security properties that complement pledge\/unveil or even work in their absence.     <\/p>\n<p>Peamine idee \u2014 teha piirangud s\u00f5lme enda jaoks. Selleks pakutakse v\u00e4lja lipp F_BELOW, mille saab seadistada funktsiooni fcntl() kaudu, v\u00f5i lipp O_BELOW open() jaoks. Sellises piiratud olekus \u00abdirfd\u00bb faili descriptor lubab ainult allapoole liikuda kataloogipuus: openat() kutseid absoluutse tee v\u00f5i \u00ab..\u00bb kaudu \u00fcleminekul l\u00f5petatakse ENOENT veaga. R\u00fcnnaku korral, mis viib koodi t\u00e4itmiseni, sisaldab protsessi failide descriptorite tabel v\u00e4hem funktsionaalseid \u00abdirfd\u00bb, mis piirab r\u00fcnde pinda.<br \/>\n<br \/>Allikas: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=66401\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat. \u041f\u0430\u0442\u0447\u0438 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f openat \u0438 open, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0432\u0435\u0440\u0445\u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c \u0447\u0435\u0440\u0435\u0437 &#171;\/..&#187; \u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u044f\u043c, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u044f\u0434\u0440\u0430, libc, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-183605","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Alexander Kovalev\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/et\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"et_EE\" \/>\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\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0424\u0421 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e openat | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/et\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat\" \/>\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=\"2026-10-05T08:54:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-10-05T08:54:25+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Theo de Raadt pakkus v\u00e4lja muudatused, et piirata juurdep\u00e4\u00e4su FS-ile funktsiooni openat kaudu | ProHoster","description":"Theo de Raadt pakkus v\u00e4lja OpenBSD-le uue mehhanismi r\u00fcnnaku pinna v\u00e4hendamiseks, mis on rakendatud s\u00fcsteemi kutsumise v\u00f5imaluste laiendamise kaudu openat.","canonical_url":"https:\/\/prohoster.info\/et\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"et_EE","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\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0424\u0421 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e openat | ProHoster","og:description":"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.","og:url":"https:\/\/prohoster.info\/et\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","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":"2026-10-05T08:54:21+00:00","article:modified_time":"2026-10-05T08:54:25+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/183605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/comments?post=183605"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/183605\/revisions"}],"predecessor-version":[{"id":183606,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/posts\/183605\/revisions\/183606"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/media?parent=183605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/categories?post=183605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/et\/wp-json\/wp\/v2\/tags?post=183605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}