BACKPORT: Smack: Assign smack_known_web as default smk_in label for kernel thread...
authorMarcin Lis <m.lis@samsung.com>
Thu, 22 Jan 2015 14:40:33 +0000 (15:40 +0100)
committerRafal Krypa <r.krypa@samsung.com>
Thu, 30 Jun 2016 12:57:46 +0000 (14:57 +0200)
commit1cf284390b5392c1dff114851a9dc5a37282f662
tree45ab651342106d81f23d9924f04704e21d8a22ca
parent6951a0138758cccea609cb302d69b6277426306a
BACKPORT: Smack: Assign smack_known_web as default smk_in label for kernel thread's socket

This change fixes the bug associated with sockets owned by kernel threads. These
sockets, created usually by network devices' drivers tasks, received smk_in
label from the task that created them - the "floor" label in the most cases. The
result was that they were not able to receive data packets because of missing
smack rules. The main reason of the access deny is that the socket smk_in label
is placed as the object during smk check, kernel thread's capabilities are
omitted.

Signed-off-by: Marcin Lis <m.lis@samsung.com>
(cherry-picked from upstream 7412301b76bd53ee53b860f611fc3b5b1c2245b5)
security/smack/smack_lsm.c