[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211221131233epcms5p2e334598b208dcd76f6efec26f879c784@epcms5p2>
Date: Tue, 21 Dec 2021 22:12:33 +0900
From: Vishal Goel <vishal.goel@...sung.com>
To: Casey Schaufler <casey@...aufler-ca.com>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: AMIT SAHRAWAT <a.sahrawat@...sung.com>,
Vaneet Narang <v.narang@...sung.com>,
"linux-audit@...hat.com" <linux-audit@...hat.com>
Subject: RE: Re: [PATCH 1/1] Smack:- Fix the issue of wrong info printed in
ptrace error logs
Hi,
>>> Signed-off-by: Vishal Goel <vishal.goel@...sung.com>
>
> What test case do you have that generates these records?
Test case for 1st log:-
void main(int argc,char *argv[])
{
int pid;
if (argc < 2) {
printf("enter pid of the tracee process\n");
exit(0);
}
pid = atoi(argv[1]);
fprintf(stderr,"Inside\n");
ptrace(PTRACE_ATTACH, pid,NULL,NULL);
while(1)
{
sleep(10);
}
}
Test case for 2nd log:-
void main(int argc,char *argv[])
{
int pid;
pid = getpid();
fprintf(stderr,"Inside\n");
ptrace(PTRACE_TRACEME, pid,NULL,NULL);
while(1)
{
sleep(10);
}
}
Test case for 3rd log:-
void main()
{
int pid;
char *argv[2];
fprintf(stderr,"Inside\n");
pid = fork();
if(pid == 0) {
argv[0] = "/tst_pt";
argv[1] = NULL;
if(ptrace(PTRACE_TRACEME, pid,NULL,NULL))
printf("attached child\n");
printf("going for exec\n");
execv("/tst_pt",argv);
}
else
{
while(1)
{
sleep(10);
}
}
}
>>
>> Added linux-audit to the CC list.
>>
Thanks
Vishal Goel
Powered by blists - more mailing lists