<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://kernsec.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RomainPerier</id>
	<title>Linux Kernel Security Subsystem - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://kernsec.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=RomainPerier"/>
	<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php/Special:Contributions/RomainPerier"/>
	<updated>2026-05-07T12:02:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3995</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3995"/>
		<updated>2019-07-03T18:13:05Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument (WIP: Romain Perier &amp;lt;romain.perier@gmail.com&amp;gt;, &amp;quot;rperier&amp;quot; on FreeNode)&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF() (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3994</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3994"/>
		<updated>2019-07-01T09:52:58Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF() (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3993</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3993"/>
		<updated>2019-06-27T14:28:53Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF()&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3992</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3992"/>
		<updated>2019-06-27T14:28:17Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF()&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* audit and fix all misuse of NLA_STRING (DONE)&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3991</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3991"/>
		<updated>2019-06-10T16:08:59Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF()&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range (WIP: Shyam Saini &amp;lt;mayhs11saini@gmail.com&amp;gt;)&lt;br /&gt;
* audit and fix all misuse of NLA_STRING (WIP: Romain Perier &amp;lt;romain.perier@gmail.com&amp;gt; (aka &amp;quot;rperier&amp;quot;, on IRC))&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
	<entry>
		<id>http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3990</id>
		<title>Kernel Self Protection Project/Work</title>
		<link rel="alternate" type="text/html" href="http://kernsec.org/wiki/index.php?title=Kernel_Self_Protection_Project/Work&amp;diff=3990"/>
		<updated>2019-06-10T16:07:38Z</updated>

		<summary type="html">&lt;p&gt;RomainPerier: /* Kernel items */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Work Areas =&lt;br /&gt;
&lt;br /&gt;
The [[Kernel Self Protection Project]] has a lot of work to do! While there are already a number of upstream [[Feature List|kernel security features]], we are still missing many. The following is far from a comprehensive list, but it's at least a starting point we can add to:&lt;br /&gt;
&lt;br /&gt;
== [[Bug Classes]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Bug Classes/Stack overflow|Stack overflow]]&lt;br /&gt;
* [[Bug Classes/Integer overflow|Integer overflow]]&lt;br /&gt;
* [[Bug Classes/Heap overflow|Heap overflow]]&lt;br /&gt;
* [[Bug Classes/Format string injection|Format string injection]]&lt;br /&gt;
* [[Bug Classes/Kernel pointer leak|Kernel pointer leak]]&lt;br /&gt;
* [[Bug Classes/Uninitialized variables|Uninitialized variables]]&lt;br /&gt;
* [[Bug Classes/Use after free|Use-after-free]]&lt;br /&gt;
&lt;br /&gt;
== [[Exploit Methods|Exploitation Methods]] ==&lt;br /&gt;
&lt;br /&gt;
* [[Exploit Methods/Kernel location|Kernel location]]&lt;br /&gt;
* [[Exploit Methods/Text overwrite|Text overwrite]]&lt;br /&gt;
* [[Exploit Methods/Function pointer overwrite|Function pointer overwrite]]&lt;br /&gt;
* [[Exploit Methods/Userspace execution|Userspace execution]]&lt;br /&gt;
* [[Exploit Methods/Userspace data usage|Userspace data usage]]&lt;br /&gt;
* [[Exploit Methods/Reused code chunks|Reused code chunks]]&lt;br /&gt;
&lt;br /&gt;
= Specific TODO Items =&lt;br /&gt;
&lt;br /&gt;
Besides the general work outlined above, there are number of specific tasks that have either been asked about frequently or are otherwise in need some time and attention:&lt;br /&gt;
&lt;br /&gt;
== Kernel items ==&lt;br /&gt;
* Split thread_info off of kernel stack (Done: x86, arm64, s390. Needed on arm, powerpc and others?)&lt;br /&gt;
* Move kernel stack to vmap area (Done: x86, s390. Needed on arm, arm64, powerpc and others?)&lt;br /&gt;
* Implement kernel relocation and KASLR for ARM&lt;br /&gt;
* Make CONFIG_STRICT_KERNEL_RWX and CONFIG_STRICT_MODULE_RWX mandatory (done for arm64 and x86, other archs still need it)&lt;br /&gt;
* Further restriction of perf_event_open (e.g. perf_event_paranoid=3)&lt;br /&gt;
* Extend HARDENED_USERCOPY to split user-facing kmalloc()s and in-kernel kmalloc()&lt;br /&gt;
* split short-lived kmalloc()s from long-lived kmalloc()s&lt;br /&gt;
* split user-size-controlled kmalloc()s from regular kmalloc()s&lt;br /&gt;
* protect ARM vector table as fixed-location kernel target&lt;br /&gt;
* disable kuser helpers on arm&lt;br /&gt;
* add constant-blinding tests to lib/test_bpf.c&lt;br /&gt;
* rename CONFIG_DEBUG_LIST better and default=y&lt;br /&gt;
* create defconfig &amp;quot;make&amp;quot; target for by-default hardened Kconfigs&lt;br /&gt;
* expand use of __ro_after_init, especially in arch/arm64&lt;br /&gt;
* restrict autoloading of kernel modules (like GRKERNSEC_MODHARDEN) ([http://www.openwall.com/lists/kernel-hardening/2017/02/02/21 Timgad LSM])&lt;br /&gt;
* set_memory_*() needs __must_check and/or atomicity&lt;br /&gt;
* refactor tasklets to avoid unsigned long argument&lt;br /&gt;
* have kfree() (and related) set the pointer to NULL too&lt;br /&gt;
* create per-task stack canary (Done: x86, arm, arm64, powerpc. Needed on s390 and others?)&lt;br /&gt;
* deprecate strcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strlcpy() in favor of strscpy()&lt;br /&gt;
* deprecate strncpy() in favor of strscpy(), strscpy_pad(), or str2mem_pad()&lt;br /&gt;
* fix sizeof_field() vs SIZEOF_FIELD() vs FIELD_SIZEOF()&lt;br /&gt;
* expand use of opt-in mult/div/add/sub overflow wrappers&lt;br /&gt;
* WARN on kfree() of ERR_PTR range&lt;br /&gt;
* audit and fix all misuse of NLA_STRING (WIP: rperier)&lt;br /&gt;
* add detection for double-reads&lt;br /&gt;
* add FORTIFY_SOURCE checks to strscpy*()&lt;br /&gt;
* add static_branch for iopl removal (and zeroing?)&lt;br /&gt;
* enhance objtool to search for ROP gadgets&lt;br /&gt;
* signed integer overflow detection&lt;br /&gt;
* unsigned integer overflow detection&lt;br /&gt;
* exec brute force detection&lt;br /&gt;
&lt;br /&gt;
== Compiler items ==&lt;br /&gt;
* Write a plugin to do format string warnings correctly (gcc's -Wformat-security is bad about const strings)&lt;br /&gt;
* Finish Clang implementation of __randomize_layout&lt;br /&gt;
* Implement clearing of caller-saved regs (https://github.com/clearlinux-pkgs/gcc/blob/master/zero-regs-gcc8.patch)&lt;/div&gt;</summary>
		<author><name>RomainPerier</name></author>
	</entry>
</feed>