Skip to contentSkip to conversation

Getting started

kernel-hardening Eddie Kovsky 4 participants 9 messages Jan 29, 2017 – Feb 10, 2017

lore
Share & tools
lore
#0 lore raw

Hi

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

I've been reading the list for several months now. I think I have a general understanding of the development process. Is there a specific TODO item I could start off with?

Eddie

#1 lore raw
Quoted 1 line · Eddie Kovsky

Hi

Hi,

Quoted 8 lines

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

I've been reading the list for several months now. I think I have a general understanding of the development process. Is there a specific TODO item I could start off with?

Here, is one TODO list:

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

Quoted 2 lines

Eddie

#2 lore raw
Quoted 11 lines · Vaishali Thakkar
Quoted 2 lines · Eddie Kovsky

Hi

Hi,

Quoted 4 lines

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 4 lines
Quoted 4 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 6 lines

Here, is one TODO list:

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

Thanks!

-Kees

Signature · 2 lines
Kees Cook
Pixel Security
#3 lore raw
Quoted 22 lines · Kees Cook
Quoted 6 lines · Vaishali Thakkar
Quoted 4 lines · Eddie Kovsky

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 4 lines
Quoted 4 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 2 lines

Here, is one TODO list:

Quoted 9 lines
Quoted 4 lines

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

I noticed there's been some activity recently with HARDENED_USERCOPY. And I looked over how mm/usercopy.c was merged in from the grsecurity patch. I'm curious about this TODO item:

Identify and extend HARDENED_USERCOPY to other usercopy functions (e.g. maybe csum_partial_copy_from_user, csum_and_copy_from_user, csum_and_copy_to_user, csum_partial_copy_nocheck?)

It doesn't look like anyone is working on this task right now. But it's not obvious (to me) what needs to happen to make progress with this. Would this be a good task to start off with?

Thanks

Eddie

Quoted 7 lines

Thanks!

-Kees

Signature · 2 lines
Kees Cook
Pixel Security
#4 lore raw
Quoted 37 lines · Eddie Kovsky
Quoted 22 lines · Kees Cook
Quoted 6 lines · Vaishali Thakkar
Quoted 4 lines · Eddie Kovsky

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 4 lines
Quoted 4 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 2 lines

Here, is one TODO list:

Quoted 9 lines
Quoted 4 lines

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

I noticed there's been some activity recently with HARDENED_USERCOPY. And I looked over how mm/usercopy.c was merged in from the grsecurity patch. I'm curious about this TODO item:

Quoted 7 lines

Identify and extend HARDENED_USERCOPY to other usercopy functions (e.g. maybe csum_partial_copy_from_user, csum_and_copy_from_user, csum_and_copy_to_user, csum_partial_copy_nocheck?)

It doesn't look like anyone is working on this task right now. But it's not obvious (to me) what needs to happen to make progress with this. Would this be a good task to start off with?

Hi,

You may want to read this thread:
https://patchwork.kernel.org/patch/9409557/

Kees, may be we should remove this item from the TODO list?

Quoted 11 lines

Thanks

Eddie

Quoted 7 lines

Thanks!

-Kees

--
Kees Cook
Pixel Security

#5 lore raw
Quoted 57 lines · Vaishali Thakkar
Quoted 49 lines · Eddie Kovsky
Quoted 30 lines · Kees Cook
Quoted 8 lines · Vaishali Thakkar
Quoted 5 lines · Eddie Kovsky

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 5 lines
Quoted 5 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I
could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 4 lines

Here, is one TODO list:

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Quoted 8 lines
Quoted 2 lines

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

I noticed there's been some activity recently with HARDENED_USERCOPY. And I looked over how mm/usercopy.c was merged in from the grsecurity patch. I'm curious about this TODO item:

Identify and extend HARDENED_USERCOPY to other usercopy functions (e.g. maybe csum_partial_copy_from_user, csum_and_copy_from_user, csum_and_copy_to_user, csum_partial_copy_nocheck?)

Quoted 5 lines

It doesn't look like anyone is working on this task right now. But it's not
obvious (to me) what needs to happen to make progress with this. Would this
be a good task to start off with?

Quoted 6 lines

Hi,

You may want to read this thread:
https://patchwork.kernel.org/patch/9409557/

Kees, may be we should remove this item from the TODO list?

Hm, yeah, or rename it to "find any other APIs that look like copy_to/from_user()". I think Mark already looked through these. Were there any remaining?

As for a thing to work about how about this:
- provide mechanism to check for ro_after_init memory areas, and reject structures not marked ro_after_init in vmbus_register()

The idea here would be to provide a mechanism functions can call to verify that their arguments are const or ro_after_init. I think it'd look a lot like the stuff in kernel/extable.c like kernel_text_address(), but it'd need to ask "is this variable in the rodata section? (Which is complicated by dealing with module rodata sections.)

Then vmbus_register() could be modified to require that its arguments are const or ro_after_init.

-Kees

Signature · 2 lines
Kees Cook
Pixel Security
#6 lore raw
Quoted 61 lines · Kees Cook
Quoted 59 lines · Vaishali Thakkar
Quoted 49 lines · Eddie Kovsky
Quoted 30 lines · Kees Cook
Quoted 8 lines · Vaishali Thakkar
Quoted 5 lines · Eddie Kovsky

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 5 lines
Quoted 5 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I
could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 4 lines

Here, is one TODO list:

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Quoted 8 lines
Quoted 2 lines

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

I noticed there's been some activity recently with HARDENED_USERCOPY. And I looked over how mm/usercopy.c was merged in from the grsecurity patch. I'm curious about this TODO item:

Identify and extend HARDENED_USERCOPY to other usercopy functions (e.g. maybe csum_partial_copy_from_user, csum_and_copy_from_user, csum_and_copy_to_user, csum_partial_copy_nocheck?)

Quoted 5 lines

It doesn't look like anyone is working on this task right now. But it's not
obvious (to me) what needs to happen to make progress with this. Would this
be a good task to start off with?

Hi,

Quoted 8 lines
Quoted 4 lines

You may want to read this thread:
https://patchwork.kernel.org/patch/9409557/

Kees, may be we should remove this item from the TODO list?

Hm, yeah, or rename it to "find any other APIs that look like copy_to/from_user()". I think Mark already looked through these. Were there any remaining?

AFAIK, no. May be get_user, put_user. But I guess it makes sense to change them after uaccess unification work.

Previously I found few API functions but they were eventually calling copy_from_user.

Quoted 16 lines

As for a thing to work about how about this:
- provide mechanism to check for ro_after_init memory areas, and reject structures not marked ro_after_init in vmbus_register()

The idea here would be to provide a mechanism functions can call to verify that their arguments are const or ro_after_init. I think it'd look a lot like the stuff in kernel/extable.c like kernel_text_address(), but it'd need to ask "is this variable in the rodata section? (Which is complicated by dealing with module rodata sections.)

Then vmbus_register() could be modified to require that its arguments are const or ro_after_init.

-Kees

#7 lore raw
In reply to Kees Cook
Quoted 27 lines · Kees Cook
Quoted 11 lines · Vaishali Thakkar
Quoted 2 lines · Eddie Kovsky

Hi

Hi,

Quoted 4 lines

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 4 lines
Quoted 4 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 2 lines

Here, is one TODO list:

Quoted 8 lines
Quoted 4 lines

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

In that context, could you please Kees update the kernsec.org wiki about GRKERNSEC_MODHARDEN and Timgad module [1] (name may change...), the proposed solution supports both a global sysctl and a per processes/container settings.

Thank you!

[1] http://www.openwall.com/lists/kernel-hardening/2017/02/02/21

Signature · 1 line
tixxdz
#8 lore raw
Quoted 37 lines · Djalal Harouni
Quoted 27 lines · Kees Cook
Quoted 11 lines · Vaishali Thakkar
Quoted 2 lines · Eddie Kovsky

Hi

Hi,

Quoted 4 lines

I'm interested in helping out with this project.

I have a few small patches in the kernel. I just finished the Eudyptula Challenge and I'm looking for places where I can continue to contribute.

Hi! Welcome to the list. :)

Quoted 4 lines
Quoted 4 lines

I've been reading the list for several months now. I think I have a general
understanding of the development process. Is there a specific TODO item I could start off with?

What areas of the kernel are you the most familiar with, and/or what things are you interested in working on? That could help me tailor some suggestions.

Quoted 2 lines

Here, is one TODO list:

Quoted 8 lines
Quoted 4 lines

https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project

Although I think few people are already working on some of these things. May be you can also check the archives of a mailing list.

The list is a bit terse (it's mostly been a brain dump as things come up), but yeah, if you see something there and want to know more, just ask. I'm happy to expand on any of them.

Quoted 8 lines

In that context, could you please Kees update the kernsec.org wiki about GRKERNSEC_MODHARDEN and Timgad module [1] (name may change...), the proposed solution supports both a global sysctl and a per processes/container settings.

Thank you!

[1] http://www.openwall.com/lists/kernel-hardening/2017/02/02/21

Sure! I added it to the TODO items list, since it doesn't overlap well with the existing Bug/Exploit categories.

Thanks!

-Kees

Signature · 2 lines
Kees Cook
Pixel Security