Linux Security Modules development
 help / color / mirror / Atom feed
From: Casey Schaufler <casey@schaufler-ca.com>
To: vishal.goel@samsung.com,
	"linux-security-module@vger.kernel.org" 
	<linux-security-module@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: AMIT SAHRAWAT <a.sahrawat@samsung.com>,
	Vaneet Narang <v.narang@samsung.com>,
	"linux-audit@redhat.com" <linux-audit@redhat.com>,
	Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH 1/1] Smack:- Fix the issue of wrong info printed in ptrace error logs
Date: Tue, 21 Dec 2021 09:01:04 -0800	[thread overview]
Message-ID: <0163902a-a442-7e43-8f73-5321109e8985@schaufler-ca.com> (raw)
In-Reply-To: <20211221131233epcms5p2e334598b208dcd76f6efec26f879c784@epcms5p2>

On 12/21/2021 5:12 AM, Vishal Goel wrote:
> Hi,
>
>>>> Signed-off-by: Vishal Goel <vishal.goel@samsung.com>
>> What test case do you have that generates these records?

Could you include a permissive license with this code?
I'd like to add it or a derivative of it to the Smack test suite.

> 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

      reply	other threads:[~2021-12-21 17:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20211220101352epcas5p3aec72d06d04f71a7c387570957a0f6c7@epcas5p3.samsung.com>
2021-12-20 10:13 ` [PATCH 1/1] Smack:- Fix the issue of wrong info printed in ptrace error logs Vishal Goel
2021-12-20 16:41   ` Casey Schaufler
2021-12-21  1:19     ` Casey Schaufler
2021-12-21 13:12       ` Vishal Goel
2021-12-21 17:01         ` Casey Schaufler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0163902a-a442-7e43-8f73-5321109e8985@schaufler-ca.com \
    --to=casey@schaufler-ca.com \
    --cc=a.sahrawat@samsung.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=v.narang@samsung.com \
    --cc=vishal.goel@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox