{"id":34721,"date":"2019-10-31T22:00:00","date_gmt":"2019-10-31T19:00:00","guid":{"rendered":"https:\/\/prohoster.info\/blog\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd\/"},"modified":"2019-10-31T22:00:00","modified_gmt":"2019-10-31T19:00:00","slug":"plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd","title":{"rendered":"Plans to strengthen the W^X protection mechanism in OpenBSD","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Theo De Raadt <noindex><a rel=\"nofollow\" href=\"https:\/\/marc.info\/?l=openbsd-tech&#038;m=155899373514678&#038;w=2\">shared<\/a><\/noindex> plans to strengthen the W^X (Write XOR Execute) memory protection mechanism. The essence of the mechanism is that memory pages of a process cannot be simultaneously accessible for writing and execution. Thus, code can only be executed after writing is prohibited, and writing to a memory page is possible only after execution is prohibited. The W^X mechanism helps protect user-space applications from typical attacks carried out via buffer overflows, including stack overflows, and is active in OpenBSD. <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=44506\">default<\/a><\/noindex>.<\/p>\n<p>From the start of work on W^X, it was clear that it would be a long journey, as there is a significant number of applications using JIT. JIT implementations can be divided into three categories:<\/p>\n<ul>\n<li class=\"l\"> Switching memory between W and X states, coming to terms with the 'cost' of a system call. <noindex><a rel=\"nofollow\" href=\"https:\/\/man.openbsd.org\/mprotect.2\">mprotect<\/a><\/noindex>.\n<li class=\"l\"> Creating aliases between a pair of W and X mappings of the same memory.\n<li class=\"l\"> The most 'dirty' variant \u2014 requiring W|X memory models, allowing simultaneous writing and execution.\n<\/ul>\n<p>Currently, there are significantly fewer programs using the third option and more using the first and second. However, since it was necessary to run programs with W|X JIT (primarily, Chromium and Iridum), an option to mount the file system 'wxallowed' was added, which allowed memory to be used for both writing and execution simultaneously if the executable ELF file is marked with the 'wxneeded' tag, while the applications themselves were further protected using mechanisms. <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=43295\">pledge<\/a><\/noindex> and <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=49042\">unveil<\/a><\/noindex> to limit the list of system calls used and the parts of the filesystem accessible to the application, respectively.<\/p>\n<p>To further complicate the exploitation of vulnerabilities in such applications, an addition to the mechanism has been proposed <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=48243\">MAP_STACK<\/a><\/noindex>, which checks whether the system call is being made from a writable memory page. If the page is writable, the process is forcibly terminated. Thus, an attacker will not be able to use system calls and will be forced to try to find the required gadgets in the JIT implementation or even do the more challenging work of detecting system call stubs directly within <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=44320\">randomly linked libc<\/a><\/noindex>. <\/p>\n<p>Chrome\/Iridium processes are quite reliably protected using pledge and unveil, but the restriction of using system calls like write(2) obviously has its advantages, as it creates additional difficulties for attackers. However, challenges may arise if JIT implementation uses native system calls from W|X memory. Nonetheless, there is reason to hope that this will not be encountered, as the ABI has changed multiple times, but no problems have ever been reported.<\/p>\n<p>The changes are already available in the regular snapshots of the OpenBSD-CURRENT branch, and all interested parties are invited to test them.<\/p>\n<p>Theo's related news about the introduction of a mode in Chrome\/Iridium deserves a separate comment. <noindex><a rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=50559\">JITless<\/a><\/noindex>. From his perspective, this is acceptable for some use cases; however, likely not for all, as in this mode the load on the processor will clearly increase. Currently, Chrome will mostly work if 'wxallowed' is disabled for \/usr\/local, although there might be issues with some extensions (ghostery is mentioned as an example). Either way, Theo hopes that full functionality in JITless mode will be brought to a fully operational state soon.<\/p>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=50763\">opennet.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0422\u0435\u043e \u0414\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 W^X (Write XOR Execute). \u0421\u0443\u0442\u044c \u043c\u0435\u0445\u043d\u0438\u0437\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0438 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0438, \u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0440\u0435\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c W^X \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0437\u0430\u0449\u0438\u0442\u0438\u0442\u044c [&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-34721","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0422\u0435\u043e \u0414\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 W^X (Write XOR Execute).\" \/>\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\/en\/blog\/news\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\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\u041f\u043b\u0430\u043d\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b W^X \u0432 OpenBSD | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0422\u0435\u043e \u0414\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 W^X (Write XOR Execute).\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd\" \/>\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=\"2019-10-31T19:00:00+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:00:00+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\udd47Plans to enhance the W^X protection mechanism in OpenBSD | ProHoster","description":"Theo De Raadt shared plans to strengthen the W^X (Write XOR Execute) memory protection mechanism.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","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\u041f\u043b\u0430\u043d\u044b \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b W^X \u0432 OpenBSD | ProHoster","og:description":"\u0422\u0435\u043e \u0414\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u043e\u0434\u0435\u043b\u0438\u043b\u0441\u044f \u043f\u043b\u0430\u043d\u0430\u043c\u0438 \u043f\u043e \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u0437\u0430\u0449\u0438\u0442\u044b \u043f\u0430\u043c\u044f\u0442\u0438 W^X (Write XOR Execute).","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/plany-po-usileniyu-mehanizma-zashhity-w-x-v-openbsd","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":"2019-10-31T19:00:00+00:00","article:modified_time":"2019-10-31T19:00:00+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"34721","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":null,"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":"2026-01-21 20:22:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:16:32","updated":"2026-01-21 20:22:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/34721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=34721"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/34721\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=34721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=34721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=34721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}