Bugtraq mailing list archives

Re: local root on linux 2.2.15


From: mouse () RODENTS MONTREAL QC CA (der Mouse)
Date: Thu, 15 Jun 2000 01:23:53 -0400


Does anyone else find this as ironic as I do?  Note the lack of
checking before using the pointers returned by malloc.

Always check the return value of system calls.  Always.  Always.
Always.

  header = malloc(8);
  data = malloc(12);
  header->pid = 0;
  header->version = _LINUX_CAPABILITY_VERSION;
  data->inheritable = data->effective = data->permitted = 0;

(And quite aside from that, who sez sizeof(*header) is 8, or
sizeof(*data) is 12?)

                                        der Mouse

                               mouse () rodents montreal qc ca
                     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Current thread: