Coredumping design error

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Fri Feb 15 12:04:39 PST 2008


Eduardo Tongson wrote:
>> su
> Password:
> syslog: Feb 16 09:40:56  su: user to root on /dev/ttyd0
> # ./coredumper
> Segmentation fault (core dumped)
> syslog: Feb 16 09:41:14  kernel: pid 728 (coredumper), uid 0: exited
> on signal 11 (core dumped)
> # md5 coredumper.core
> MD5 (coredumper.core) = 68e3e5fee874e688c795537721a6b511
> # ls -la coredumper.core
> -rw-------  1 user  user  1003520 Feb 16 09:41 coredumper.core
> #
> 
> I was not able to test the below patch. Trivial enough to fix if broken.
> 
> --- kern_sig.c	2008-02-14 13:41:12.000000000 +0800
> +++ kern_sig-20080216.c	2008-02-16 01:15:01.000000000 +0800
> @@ -2066,6 +2066,12 @@ coredump(struct lwp *lp, int sig)
>  		goto out1;
>  	}
> 
> +        /* Don't dump to files current user does not own */

Shouldn't we rather remove the file and recreate a new file (which then
will be owned by root)?

cheers
  simon

Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00005.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/bugs/attachments/20080215/5ace6832/attachment-0016.obj>


More information about the Bugs mailing list