{"id":174,"date":"2008-11-21T13:39:56","date_gmt":"2008-11-21T21:39:56","guid":{"rendered":"http:\/\/www.outflux.net\/blog\/?p=174"},"modified":"2008-11-21T13:40:15","modified_gmt":"2008-11-21T21:40:15","slug":"make-your-bios-love-security","status":"publish","type":"post","link":"https:\/\/outflux.net\/blog\/archives\/2008\/11\/21\/make-your-bios-love-security\/","title":{"rendered":"make your BIOS love security"},"content":{"rendered":"<p>There&#8217;s this great CPU feature called &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/NX_bit\">nx<\/a>&#8221; &#8212; it protects your computer from intrusion by blocking execution of memory regions that weren&#8217;t expected to be executable (i.e. stack\/heap data).  You really want this enabled.  Unfortunately for you, it seems some BIOSes default to disabling it.  On Dell laptops, look under &#8220;Security&#8221; \/ &#8220;CPU XD Support&#8221;: you want it enabled.  In an American Megatrends BIOS, I found it under &#8220;CPU Features&#8221; \/ &#8220;Execute Disable Bit&#8221;: you want it enabled.<\/p>\n<p>As far as making use of the CPU feature once it&#8217;s not disabled in the BIOS, you&#8217;re already using it if you&#8217;re running a 64bit kernel.  And if you&#8217;re using 32bit, you can start using it if you install the <code>-server<\/code> flavor of the 32bit kernel.  As a bonus, you get to <a href=\"http:\/\/www.outflux.net\/blog\/archives\/2007\/09\/27\/stupid-bios-tricks-to-find-your-4g-of-ram\/\">address all your physical RAM<\/a> if you do this too (since -server&#8217;s &#8220;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Physical_Address_Extension\">PAE<\/a>&#8221; mode is the kernel mode that allows &#8220;nx&#8221; to work).  For Ubuntu Jaunty, I&#8217;m hoping to get some element of the system (installer? jockey?) to <a href=\"https:\/\/blueprints.launchpad.net\/ubuntu\/+spec\/use-pae-when-possible\">make the right kernel selection<\/a> for a given system.<\/p>\n<p>If &#8220;pae&#8221; is in your \/proc\/cpuinfo flags:<br \/>\n<code><\/p>\n<pre>\r\n$ grep --color pae \/proc\/cpuinfo\r\nflags\t\t: fpu vme de pse tsc msr <strong>pae<\/strong> mce cx8 apic sep mtrr pge mca cmov \\\r\npat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall <em>nx<\/em> lm constant_tsc \\\r\narch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm\r\n<\/pre>\n<p><\/code>(note the &#8220;nx&#8221; in there too, since my BIOS isn&#8217;t set to disable it)<\/p>\n<p>Then you almost certainly want to use <code>-server<\/code> kernel flavor:<br \/>\n<code><\/p>\n<pre>\r\nsudo apt-get install linux-server linux-restricted-modules-server\r\n<\/pre>\n<p><\/code><\/p>\n<p style='text-align:left'>&copy; 2008, <a href=\"https:\/\/outflux.net\/blog\/\">Kees Cook<\/a>. This work is licensed under a <a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\">Creative Commons Attribution-ShareAlike 4.0 License<\/a>.<br \/><a rel=\"license\" href=\"http:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/\"><img decoding=\"async\" alt=\"CC BY-SA 4.0\" style=\"border-width:0\" src=\"https:\/\/i.creativecommons.org\/l\/by-sa\/4.0\/88x31.png\" \/><\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There&#8217;s this great CPU feature called &#8220;nx&#8221; &#8212; it protects your computer from intrusion by blocking execution of memory regions that weren&#8217;t expected to be executable (i.e. stack\/heap data). You really want this enabled. Unfortunately for you, it seems some BIOSes default to disabling it. On Dell laptops, look under &#8220;Security&#8221; \/ &#8220;CPU XD Support&#8221;: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,14,19],"tags":[],"_links":{"self":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/174"}],"collection":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":0,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"wp:attachment":[{"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/outflux.net\/blog\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}