CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/external/source/exploits/CVE-2017-13861/koffsets.h
Views: 11780
1
#ifndef koffsets_h
2
#define koffsets_h
3
4
enum kstruct_offset {
5
/* struct task */
6
KSTRUCT_OFFSET_TASK_LCK_MTX_TYPE,
7
KSTRUCT_OFFSET_TASK_REF_COUNT,
8
KSTRUCT_OFFSET_TASK_ACTIVE,
9
KSTRUCT_OFFSET_TASK_VM_MAP,
10
KSTRUCT_OFFSET_TASK_NEXT,
11
KSTRUCT_OFFSET_TASK_PREV,
12
KSTRUCT_OFFSET_TASK_ITK_SPACE,
13
KSTRUCT_OFFSET_TASK_BSD_INFO,
14
KSTRUCT_OFFSET_TASK_ALL_IMAGE_INFO_ADDR,
15
KSTRUCT_OFFSET_TASK_ALL_IMAGE_INFO_SIZE,
16
KSTRUCT_OFFSET_TASK_TFLAGS,
17
18
/* struct ipc_port */
19
KSTRUCT_OFFSET_IPC_PORT_IO_BITS,
20
KSTRUCT_OFFSET_IPC_PORT_IO_REFERENCES,
21
KSTRUCT_OFFSET_IPC_PORT_IKMQ_BASE,
22
KSTRUCT_OFFSET_IPC_PORT_MSG_COUNT,
23
KSTRUCT_OFFSET_IPC_PORT_IP_RECEIVER,
24
KSTRUCT_OFFSET_IPC_PORT_IP_KOBJECT,
25
KSTRUCT_OFFSET_IPC_PORT_IP_PREMSG,
26
KSTRUCT_OFFSET_IPC_PORT_IP_CONTEXT,
27
KSTRUCT_OFFSET_IPC_PORT_IP_SRIGHTS,
28
29
/* struct proc */
30
KSTRUCT_OFFSET_PROC_PID,
31
KSTRUCT_OFFSET_PROC_P_FD,
32
KSTRUCT_OFFSET_PROC_TASK,
33
KSTRUCT_OFFSET_PROC_UCRED,
34
KSTRUCT_OFFSET_PROC_P_LIST,
35
36
/* struct filedesc */
37
KSTRUCT_OFFSET_FILEDESC_FD_OFILES,
38
39
/* struct fileproc */
40
KSTRUCT_OFFSET_FILEPROC_F_FGLOB,
41
42
/* struct fileglob */
43
KSTRUCT_OFFSET_FILEGLOB_FG_DATA,
44
45
/* struct socket */
46
KSTRUCT_OFFSET_SOCKET_SO_PCB,
47
48
/* struct pipe */
49
KSTRUCT_OFFSET_PIPE_BUFFER,
50
51
/* struct ipc_space */
52
KSTRUCT_OFFSET_IPC_SPACE_IS_TABLE_SIZE,
53
KSTRUCT_OFFSET_IPC_SPACE_IS_TABLE,
54
55
/* struct vnode */
56
KSTRUCT_OFFSET_VNODE_V_MOUNT,
57
KSTRUCT_OFFSET_VNODE_VU_SPECINFO,
58
KSTRUCT_OFFSET_VNODE_V_LOCK,
59
60
/* struct specinfo */
61
KSTRUCT_OFFSET_SPECINFO_SI_FLAGS,
62
63
/* struct mount */
64
KSTRUCT_OFFSET_MOUNT_MNT_FLAG,
65
66
/* struct host */
67
KSTRUCT_OFFSET_HOST_SPECIAL,
68
69
KFREE_ADDR_OFFSET,
70
};
71
72
int koffset(enum kstruct_offset offset);
73
void offsets_init(void);
74
75
#endif
76
77