{"id":1671,"date":"2024-11-21T17:07:30","date_gmt":"2024-11-21T23:07:30","guid":{"rendered":"https:\/\/embeddedor.com\/blog\/?p=1671"},"modified":"2026-04-14T15:54:03","modified_gmt":"2026-04-14T21:54:03","slug":"yet-another-memory-corruption-bug-in-the-linux-kernel","status":"publish","type":"post","link":"https:\/\/embeddedor.com\/blog\/2024\/11\/21\/yet-another-memory-corruption-bug-in-the-linux-kernel\/","title":{"rendered":"Yet another memory corruption bug in the Linux kernel"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"255\" src=\"https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf-700x255.png\" alt=\"\" class=\"wp-image-1656\" srcset=\"https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf-700x255.png 700w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf-300x109.png 300w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf-768x280.png 768w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf-800x291.png 800w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-16-14-55-lpceu2024.pdf.png 1117w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Yet another memory corruption bug caught thanks to -Wflex-array-member-not-at-end! &#x1f41b;&#x1fab2;&#x1f427;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/lore.kernel.org\/linux-hardening\/ZzZ-cd_EFXs6qFaH@kspp\/\" target=\"_blank\" rel=\"noreferrer noopener\">[PATCH] clk: clk-loongson2: Fix memory corruption bug in struct loongson2_clk_provider<\/a><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"1014\" src=\"https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva-700x1014.png\" alt=\"\" class=\"wp-image-1672\" srcset=\"https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva-700x1014.png 700w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva-207x300.png 207w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva-768x1113.png 768w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva-800x1159.png 800w, https:\/\/embeddedor.com\/blog\/wp-content\/uploads\/2024\/11\/Screenshot-2024-11-21-at-17-01-46-PATCH-clk-clk-loongson2-Fix-memory-corruption-bug-in-struct-loongson2_clk_provider-Gustavo-A.-R.-Silva.png 860w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p><br><br>The maintainer has already taken this patch, and it will soon land in mainline and a couple of stable trees. &#x1f603;&#x1f427;<br><br>Here&#8217;s a link to the slides and video from my latest presentation at <a href=\"https:\/\/www.linkedin.com\/company\/linux-plumbers\/\">Linux Plumbers Conference<\/a>, where I discuss the ongoing efforts to globally enable the -Wflex-array-member-not-at-end compiler option in the upstream Linux kernel:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/embeddedor.com\/blog\/presentations\/#Enhancing_spatial_safety_Fixing_thousands_of_-Wflex-array-member-not-at-end_warnings_LPCEU\" target=\"_blank\" rel=\"noreferrer noopener\">Enhancing spatial safety: Fixing thousands of -Wflex-array-member-not-at-end warnings (LPCEU)<\/a><\/li>\n<\/ul>\n\n\n\n<p><br>This work aims to eradicate these types of memory corruption vulnerabilities from the kernel once and for all. &#x1f600;&#x1f64c;&#x1f3fd;<br><br>Kernel Self-Protection Project &#x2694;&#xfe0f;&#x1f6e1;&#xfe0f;&#x1f427;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yet another memory corruption bug caught thanks to -Wflex-array-member-not-at-end! &#x1f41b;&#x1fab2;&#x1f427; The maintainer has already taken this patch, and it will soon land in mainline and a couple of stable trees. &#x1f603;&#x1f427; Here&#8217;s a link to the slides and video from my latest presentation at Linux Plumbers Conference, where I discuss the ongoing efforts to globally&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[31,20,13,18,9,29],"tags":[],"class_list":["post-1671","post","type-post","status-publish","format-standard","hentry","category-wfamnae","category-conferences","category-kernel-self-protection-project","category-linux-kernel-bugs","category-linux-kernel-hardening","category-presentations"],"_links":{"self":[{"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/posts\/1671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/comments?post=1671"}],"version-history":[{"count":3,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions"}],"predecessor-version":[{"id":1676,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/posts\/1671\/revisions\/1676"}],"wp:attachment":[{"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/media?parent=1671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/categories?post=1671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/embeddedor.com\/blog\/wp-json\/wp\/v2\/tags?post=1671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}