kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* [Clarification] writes to kernel addresses that came from userspace
@ 2021-09-12 16:20 Len Baker
  2021-09-12 18:22 ` Valentin Vidić
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Len Baker @ 2021-09-12 16:20 UTC (permalink / raw)
  To: kernelnewbies@kernelnewbies.org, Kees Cook; +Cc: Len Baker

Hi,

I am taking a look to the issues in the Kernel Self Protection Project [1]
and this one [2] (perform taint-tracking of writes to kernel addresses
that came from userspace) take my attention. Reading the explanation does
not make it clear to me where the flaw is.

[extracted from the KSPP]

It should be possible to perform taint tracking of addresses in the kernel
to avoid flaws of the form:

copy_from_user(object, src, ...);
...
memcpy(object.address, something, ...);

[end of extracted]

My question is: Why is this scenario a flaw?

If I understand correctly, the copy_from_user() function copies n bytes of
src (in user space address) to object (in kernel space address). I think
that it is the correct way to act. Then, in kernel space the object is
modified. So, I don't see the problem. Sorry if it is a trivial question
but I can not figure it out on my own.

[1] https://github.com/KSPP/linux/issues
[2] https://github.com/KSPP/linux/issues/126

Thanks in advance.

Regards,
Len

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-18  9:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-12 16:20 [Clarification] writes to kernel addresses that came from userspace Len Baker
2021-09-12 18:22 ` Valentin Vidić
2021-09-12 18:47 ` Kees Cook
2021-09-13  7:59 ` Bernd Petrovitsch
2021-09-13 18:01   ` Kees Cook
2021-09-16  0:59 ` Random Guy
2021-09-18  9:47 ` Len Baker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).