lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260209184247.4c6daccd@fedora>
Date: Mon, 9 Feb 2026 18:42:47 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH v6 2/4] tracing: Make the backup instance non-reusable

On Mon, 9 Feb 2026 18:08:44 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:
> > > @@ -5152,6 +5157,9 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf,
> > >  	cpumask_var_t tracing_cpumask_new;
> > >  	int err;
> > >  
> > > +	if (trace_array_is_readonly(tr))
> > > +		return -EPERM;
> > > +  
> > 
> > Shouldn't these checks be done in the open function? Doing it now is
> > too late, as -EPERM on a write is confusing when the open for write
> > succeeds.  
> 
> I've made a small program and straced. Surprisingly, for the super user,
> open(2) does not return error on opening a readonly file with O_RDWR.

*blink*

So if on open, the trace_array_is_read_only(tr) returns true and you
return -EPREM, it still succeeds? That sounds like a bug!

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ