{"id":38082,"date":"2023-01-06T14:44:08","date_gmt":"2023-01-06T19:44:08","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=38082"},"modified":"2023-01-06T14:44:08","modified_gmt":"2023-01-06T19:44:08","slug":"memory-safe-languages-in-android-13","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/01\/06\/memory-safe-languages-in-android-13\/","title":{"rendered":"Memory Safe Languages in Android 13"},"content":{"rendered":"<p><a href=\"https:\/\/security.googleblog.com\/2022\/12\/memory-safe-languages-in-android-13.html\">Jeffrey Vander Stoep<\/a>:<\/p>\n<blockquote cite=\"https:\/\/security.googleblog.com\/2022\/12\/memory-safe-languages-in-android-13.html\">\n<p>For more than a decade, memory safety vulnerabilities have consistently represented more than 65% of vulnerabilities across products, and across the industry. On Android, we&rsquo;re now seeing something different - a significant drop in memory safety vulnerabilities and an associated drop in the severity of our vulnerabilities.<\/p>\n<p>[&#8230;]<\/p>\n<p>This drop coincides with a shift in programming language usage away from memory unsafe languages. Android 13 is the first Android release where a majority of new code added to the release is in a memory safe language.<\/p>\n<p>[&#8230;]<\/p>\n<p>While correlation doesn&rsquo;t necessarily mean causation, it&rsquo;s interesting to note that the percent of vulnerabilities caused by memory safety issues seems to correlate rather closely with the development language that&rsquo;s used for new code.<\/p>\n<p>[&#8230;]<\/p>\n<p>In Android 13, about 21% of all new native code (C\/C++\/Rust) is in Rust. There are approximately 1.5 million total lines of Rust code in AOSP across new functionality and components such as Keystore2, the new Ultra-wideband (UWB) stack, DNS-over-HTTP3, Android&rsquo;s Virtualization framework (AVF), and various other components and their open source dependencies. [&#8230;] To date, there have been zero memory safety vulnerabilities discovered in Android&rsquo;s Rust code.<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/11\/02\/apples-use-of-swift-and-swiftui-in-ios-16\/\">Apple&rsquo;s Use of Swift and SwiftUI in iOS 16<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Jeffrey Vander Stoep: For more than a decade, memory safety vulnerabilities have consistently represented more than 65% of vulnerabilities across products, and across the industry. On Android, we&rsquo;re now seeing something different - a significant drop in memory safety vulnerabilities and an associated drop in the severity of our vulnerabilities. [&#8230;] This drop coincides with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-01-06T19:44:12Z","apple_news_api_id":"6dadb831-73ff-41f0-9f58-93b29613654a","apple_news_api_modified_at":"2023-01-06T19:44:12Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/Aba24MXP_QfCfWJOylhNlSg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[248,571,71,408,48],"class_list":["post-38082","post","type-post","status-publish","format-standard","hentry","category-technology","tag-android","tag-memory-management","tag-programming","tag-rust-lang","tag-security"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38082","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=38082"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38082\/revisions"}],"predecessor-version":[{"id":38083,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/38082\/revisions\/38083"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=38082"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=38082"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=38082"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}