Re: kernel BUG at kernel/cred.c:434!

2019-04-23 Thread Paul Moore
On Tue, Apr 23, 2019 at 12:08 AM Yang Yingliang wrote: > On 2019/4/23 3:48, Paul Moore wrote: > > On Sat, Apr 20, 2019 at 3:39 AM Yang Yingliang > > wrote: > >> I'm not sure you got my point. > > I went back and looked at your previous emails again to try and > > understand what you are talking

Re: kernel BUG at kernel/cred.c:434!

2019-04-22 Thread Yang Yingliang
On 2019/4/23 3:48, Paul Moore wrote: On Sat, Apr 20, 2019 at 3:39 AM Yang Yingliang wrote: I'm not sure you got my point. I went back and looked at your previous emails again to try and understand what you are talking about, and I'm a little confused by some of the output ... ---

Re: kernel BUG at kernel/cred.c:434!

2019-04-22 Thread Paul Moore
his again? Looking at the task pointer and the timestamp, this is the same task exiting and trying to write to the accounting file, yes? This output is particularly curious since it appears that real_cred has changed; where is this happening? > [ 56.653565] [ cut here ]-

Re: kernel BUG at kernel/cred.c:434!

2019-04-20 Thread Yang Yingliang
On 2019/4/20 0:13, Paul Moore wrote: On Fri, Apr 19, 2019 at 10:34 AM Yang Yingliang wrote: On 2019/4/19 21:24, Paul Moore wrote: On Thu, Apr 18, 2019 at 10:42 PM Yang Yingliang wrote: On 2019/4/19 10:04, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:50 PM Yang Yingliang wrote: On

Re: kernel BUG at kernel/cred.c:434!

2019-04-19 Thread Paul Moore
On Thu, Apr 18, 2019 at 10:42 PM Yang Yingliang wrote: > On 2019/4/19 10:04, Paul Moore wrote: > > On Wed, Apr 17, 2019 at 10:50 PM Yang Yingliang > > wrote: > >> On 2019/4/18 8:24, Casey Schaufler wrote: > >>> On 4/17/2019 4:39 PM, Paul Moore wrote: > Since it looks like all three LSMs

Re: kernel BUG at kernel/cred.c:434!

2019-04-19 Thread Paul Moore
On Fri, Apr 19, 2019 at 10:34 AM Yang Yingliang wrote: > On 2019/4/19 21:24, Paul Moore wrote: > > On Thu, Apr 18, 2019 at 10:42 PM Yang Yingliang > > wrote: > >> On 2019/4/19 10:04, Paul Moore wrote: > >>> On Wed, Apr 17, 2019 at 10:50 PM Yang Yingliang > >>> wrote: > On 2019/4/18 8:24,

Re: kernel BUG at kernel/cred.c:434!

2019-04-19 Thread Yang Yingliang
f88841ae450c0 [ 56.653565] --------[ cut here ]-------- [ 56.655119] kernel BUG at kernel/cred.c:434! [ 56.656590] invalid opcode: [#1] SMP PTI [ 56.658033] CPU: 2 PID: 4169 Comm: syz-executor.15 Not tainted 5.1.0-rc4-00034-g869e3305f23d-dirty #143 [ 56.661077] Hardware name: QEMU S

Re: kernel BUG at kernel/cred.c:434!

2019-04-18 Thread Yang Yingliang
On 2019/4/19 10:04, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:50 PM Yang Yingliang wrote: On 2019/4/18 8:24, Casey Schaufler wrote: On 4/17/2019 4:39 PM, Paul Moore wrote: Since it looks like all three LSMs which implement the setprocattr hook are vulnerable I'm open to the idea that

Re: kernel BUG at kernel/cred.c:434!

2019-04-18 Thread Paul Moore
On Wed, Apr 17, 2019 at 10:50 PM Yang Yingliang wrote: > On 2019/4/18 8:24, Casey Schaufler wrote: > > On 4/17/2019 4:39 PM, Paul Moore wrote: > >> > >> Since it looks like all three LSMs which implement the setprocattr > >> hook are vulnerable I'm open to the idea that proc_pid_attr_write() is >

Re: kernel BUG at kernel/cred.c:434!

2019-04-18 Thread Stephen Smalley
On 4/17/19 12:42 PM, Casey Schaufler wrote: On 4/17/2019 9:27 AM, Oleg Nesterov wrote: On 04/17, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: I'm tempted to simply return an error in selinux_setprocattr() if the task's credentials are

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Yang Yingliang
Hi, Casey On 2019/4/18 8:24, Casey Schaufler wrote: On 4/17/2019 4:39 PM, Paul Moore wrote: On Wed, Apr 17, 2019 at 12:27 PM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: I'm tempted to simply return an

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Casey Schaufler
On 4/17/2019 4:39 PM, Paul Moore wrote: On Wed, Apr 17, 2019 at 12:27 PM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: I'm tempted to simply return an error in selinux_setprocattr() if the task's

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread John Johansen
On 4/17/19 4:39 PM, Paul Moore wrote: > On Wed, Apr 17, 2019 at 12:27 PM Oleg Nesterov wrote: >> On 04/17, Paul Moore wrote: >>> >>> On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: > > I'm tempted to simply return an error in selinux_setprocattr()

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Paul Moore
On Wed, Apr 17, 2019 at 12:27 PM Oleg Nesterov wrote: > On 04/17, Paul Moore wrote: > > > > On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: > > > On 04/17, Paul Moore wrote: > > > > > > > > I'm tempted to simply return an error in selinux_setprocattr() if > > > > the task's credentials are

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Casey Schaufler
On 4/17/2019 9:27 AM, Oleg Nesterov wrote: On 04/17, Paul Moore wrote: On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: On 04/17, Paul Moore wrote: I'm tempted to simply return an error in selinux_setprocattr() if the task's credentials are not the same as its real_cred; What about

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Oleg Nesterov
On 04/17, Paul Moore wrote: > > On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: > > On 04/17, Paul Moore wrote: > > > > > > I'm tempted to simply return an error in selinux_setprocattr() if > > > the task's credentials are not the same as its real_cred; > > > > What about other modules? I

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Paul Moore
On Wed, Apr 17, 2019 at 10:57 AM Oleg Nesterov wrote: > On 04/17, Paul Moore wrote: > > > > I'm tempted to simply return an error in selinux_setprocattr() if > > the task's credentials are not the same as its real_cred; > > What about other modules? I have no idea what smack_setprocattr() is, >

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Casey Schaufler
On 4/17/2019 7:57 AM, Oleg Nesterov wrote: On 04/17, Paul Moore wrote: I'm tempted to simply return an error in selinux_setprocattr() if the task's credentials are not the same as its real_cred; What about other modules? I have no idea what smack_setprocattr() is, but it too does

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Oleg Nesterov
On 04/17, Paul Moore wrote: > > I'm tempted to simply return an error in selinux_setprocattr() if > the task's credentials are not the same as its real_cred; What about other modules? I have no idea what smack_setprocattr() is, but it too does prepare_creds/commit creds. it seems that the

Re: kernel BUG at kernel/cred.c:434!

2019-04-17 Thread Paul Moore
On Tue, Apr 16, 2019 at 10:46 AM chengjian (D) wrote: > On 2019/4/16 11:40, Kees Cook wrote: > > On Mon, Apr 15, 2019 at 11:20 AM Paul Moore wrote: > >> On Mon, Apr 15, 2019 at 11:05 AM Oleg Nesterov wrote: > >>> On 04/15, Paul Moore wrote: > On Mon, Apr 15, 2019 at 9:43 AM Oleg Nesterov

Re: kernel BUG at kernel/cred.c:434!

2019-04-16 Thread chengjian (D)
On 2019/4/16 11:40, Kees Cook wrote: On Mon, Apr 15, 2019 at 11:20 AM Paul Moore wrote: On Mon, Apr 15, 2019 at 11:05 AM Oleg Nesterov wrote: On 04/15, Paul Moore wrote: On Mon, Apr 15, 2019 at 9:43 AM Oleg Nesterov wrote: Well, acct("/proc/self/attr/current") doesn't look like a good

Re: kernel BUG at kernel/cred.c:434!

2019-04-15 Thread Kees Cook
On Mon, Apr 15, 2019 at 11:20 AM Paul Moore wrote: > > On Mon, Apr 15, 2019 at 11:05 AM Oleg Nesterov wrote: > > On 04/15, Paul Moore wrote: > > > > > > On Mon, Apr 15, 2019 at 9:43 AM Oleg Nesterov wrote: > > > > Well, acct("/proc/self/attr/current") doesn't look like a good idea, > > > > but

Re: kernel BUG at kernel/cred.c:434!

2019-04-15 Thread Paul Moore
On Mon, Apr 15, 2019 at 11:05 AM Oleg Nesterov wrote: > On 04/15, Paul Moore wrote: > > > > On Mon, Apr 15, 2019 at 9:43 AM Oleg Nesterov wrote: > > > Well, acct("/proc/self/attr/current") doesn't look like a good idea, but > > > I do > > > not know where should we put the additional check...

Re: kernel BUG at kernel/cred.c:434!

2019-04-15 Thread Oleg Nesterov
On 04/15, Paul Moore wrote: > > On Mon, Apr 15, 2019 at 9:43 AM Oleg Nesterov wrote: > > Well, acct("/proc/self/attr/current") doesn't look like a good idea, but I > > do > > not know where should we put the additional check... And probably > > "echo /proc/self/attr/current >

Re: kernel BUG at kernel/cred.c:434!

2019-04-15 Thread Paul Moore
PM, chengjian (D) wrote: > > > > Added LSM and SELinux lists. > > > > > > >Hi. > > > > > > > > >syzkaller reported the following BUG: > > > > > >[ 73.146973] kernel BUG at kernel/cred.c:434! > > >[

Re: kernel BUG at kernel/cred.c:434!

2019-04-15 Thread Oleg Nesterov
t;Hi. > > > > > >syzkaller reported the following BUG: > > > >[   73.146973] kernel BUG at kernel/cred.c:434! > >[   73.150231] invalid opcode: [#1] SMP KASAN PTI > >[   73.151928] CPU: 2 PID: 4058 Comm: syz-executor.6 Not tainted > >5.1.0-rc4-00062-g2d06b

Re: kernel BUG at kernel/cred.c:434!

2019-04-12 Thread Casey Schaufler
On 4/11/2019 11:21 PM, chengjian (D) wrote: Added LSM and SELinux lists. Hi. syzkaller reported the following BUG: [   73.146973] kernel BUG at kernel/cred.c:434! [   73.150231] invalid opcode: [#1] SMP KASAN PTI [   73.151928] CPU: 2 PID: 4058 Comm: syz-executor.6 Not tainted 5.1.0

kernel BUG at kernel/cred.c:434!

2019-04-12 Thread chengjian (D)
Hi. syzkaller reported the following BUG: [   73.146973] kernel BUG at kernel/cred.c:434! [   73.150231] invalid opcode: [#1] SMP KASAN PTI [   73.151928] CPU: 2 PID: 4058 Comm: syz-executor.6 Not tainted 5.1.0-rc4-00062-g2d06b235815e-dirty #2 [   73.155174] Hardware name: QEMU Standard