projects
/
platform
/
core
/
system
/
kdbus-bus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
541f9eb
)
do not accept "kernel messages" from userspace
author
Kay Sievers
<kay@vrfy.org>
Fri, 27 Dec 2013 02:50:39 +0000
(
03:50
+0100)
committer
Kay Sievers
<kay@vrfy.org>
Fri, 27 Dec 2013 02:50:39 +0000
(
03:50
+0100)
message.c
patch
|
blob
|
history
diff --git
a/message.c
b/message.c
index 16db583768eef879290f4becc1657a17f7c66adb..94cfc2cd06465072b0b9f125d5ec4bd9794459af 100644
(file)
--- a/
message.c
+++ b/
message.c
@@
-269,6
+269,12
@@
int kdbus_kmsg_new_from_user(struct kdbus_conn *conn,
goto exit_free;
}
+ /* do not accept kernel-generated messages */
+ if (m->msg.payload_type == 0) {
+ ret = -EINVAL;
+ goto exit_free;
+ }
+
/* requests for replies need a timeout */
if (m->msg.flags & KDBUS_MSG_FLAGS_EXPECT_REPLY &&
m->msg.timeout_ns == 0) {