{"id":274500,"date":"2026-06-16T09:54:00","date_gmt":"2026-06-16T13:54:00","guid":{"rendered":"https:\/\/news-you-need.com\/index.php\/2026\/06\/16\/linux-7-2-adds-ability-to-limit-programs-to-only-open-regular-files-avoid-being-tricked-or-doing-silly-things\/"},"modified":"2026-06-16T11:07:36","modified_gmt":"2026-06-16T15:07:36","slug":"linux-7-2-adds-ability-to-limit-programs-to-only-open-regular-files-avoid-being-tricked-or-doing-silly-things","status":"publish","type":"post","link":"https:\/\/news-you-need.com\/index.php\/2026\/06\/16\/linux-7-2-adds-ability-to-limit-programs-to-only-open-regular-files-avoid-being-tricked-or-doing-silly-things\/","title":{"rendered":"Linux 7.2 Adds Ability To Limit Programs To Only Open Regular Files, Avoid Being Tricked Or Doing Silly Things"},"content":{"rendered":"<p><a href=\"https:\/\/www.phoronix.com\/news\/Linux-7.2-VFS-OPENAT2-REGULAR\">Linux 7.2 Adds Ability To Limit Programs To Only Open Regular Files, Avoid Being Tricked Or Doing Silly Things<\/a><\/p>\n<p><a href=\"https:\/\/www.phoronix.com\/news\/Linux-7.2-VFS-OPENAT2-REGULAR\">https:\/\/www.phoronix.com\/news\/Linux-7.2-VFS-OPENAT2-REGULAR<\/a><\/p>\n<p>Publish Date: <a href=\"publish_date]\">2026-06-16 09:54:00<\/a><\/p>\n<p>Source Domain: <a href=\"www.phoronix.com\">www.phoronix.com<\/a><\/p>\n<p>Merged as part of the many VFS changes for Linux 7.2 is the new OPENAT2_REGULAR flag for the openat2 system call. This can be used to limit programs to only open regular file-systems and avoid accidentally or intentionally opening up device files or other non-conventional data files on the file-system.<\/p>\n<p>OPENAT2_REGULAR can be used with Linux 7.2+ for user-space programs wanting to only interact with regular files on the file-system and avoid opening up device nodes or other special files. Such as there should be no reason a web browser or text editor would need to open \/dev\/zero or \/dev\/random for an endless stream of data&#8230;<br \/>\n<\/p>\n<p align=\"center\"><img decoding=\"async\" src=\"https:\/\/www.phoronix.net\/image.php?id=2026&#038;image=firefox_dev_random_med\" alt=\"Firefox opening \/dev\/random\"\/><\/p>\n<p>This is useful for security purposes and just avoiding the potential of opening files the program may not expect or have any use in interacting with.<\/p>\n<p>When the OPENAT2_REGULAR is set for openat2, any non-regular file will return an &#8220;EFTYPE&#8221; error code.\n<\/p>\n<p>This useful addition was merged for Linux 7.2 as part of this VFS pull. That same pull request also adds O_EMPTYPATH for openat\/openat2 to get an operable file descriptor from an O_PATH file descriptor.<\/p>\n<p><a href=\"https:\/\/www.phoronix.com\/news\/Linux-7.2-VFS-OPENAT2-REGULAR\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux 7.2 Adds Ability To Limit Programs To Only Open Regular Files, Avoid Being Tricked&#8230;<\/p>\n","protected":false},"author":1,"featured_media":274501,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.phoronix.net\/image.php?id=2026&image=firefox_dev_random","fifu_image_alt":"","footnotes":""},"categories":[48],"tags":[71,57],"class_list":["post-274500","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-security"],"_links":{"self":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274500"}],"collection":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/comments?post=274500"}],"version-history":[{"count":1,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274500\/revisions"}],"predecessor-version":[{"id":274502,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/274500\/revisions\/274502"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media\/274501"}],"wp:attachment":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media?parent=274500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/categories?post=274500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/tags?post=274500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}