From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Grubb Subject: Re: [PATCH] Audit of POSIX Message Queue Syscalls Date: Wed, 17 May 2006 14:27:15 -0400 Message-ID: <200605171427.15319.sgrubb@redhat.com> References: <20060517014055.GA16852@us.ibm.com> <1147876484.11589.46.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1147876484.11589.46.camel@localhost.localdomain> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-audit-bounces@redhat.com Errors-To: linux-audit-bounces@redhat.com To: linux-audit@redhat.com List-Id: linux-audit@redhat.com On Wednesday 17 May 2006 10:34, Timothy R. Chavez wrote: > > =C2=A0out_fput: > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0fput(filp); > > =C2=A0out: > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0audret =3D audit_mq_getsetattr(mqdes, = &mqstat, &omqstat); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if (ret =3D=3D 0) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0ret =3D audret; > > At a cursory glance, this looks a little fishy to me... I think the intent is OK...but the real problem that I see is that it=20 generates a record also when calling mq_getattr(). Seems like the functio= n=20 could be put here 1095 if (u_mqstat !=3D NULL) { 1096 if (copy_from_user(&mqstat, u_mqstat, sizeof(struct=20 mq_attr))) 1097 return -EFAULT; 1098 if (mqstat.mq_flags & (~O_NONBLOCK)) 1099 return -EINVAL; --> audret =3D audit_mq_getsetattr(mqdes, &mqstat); if (audret) return audret; =20 1100 } omqstat does not need to be recorded does it? AFAICT, this is the status=20 buffer going back to the user. -Steve