MCPcopy Create free account
hub / github.com/bsauce/kernel-exploit-factory / write_msg

Function write_msg

CVE-2021-22555/exploit.c:179–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179int write_msg(int msqid, const void *msgp, size_t msgsz, long msgtyp) {
180 *(long *)msgp = msgtyp;
181 if (msgsnd(msqid, msgp, msgsz - sizeof(long), 0) < 0) {
182 perror("[-] msgsnd");
183 return -1;
184 }
185 return 0;
186}
187
188int peek_msg(int msqid, void *msgp, size_t msgsz, long msgtyp) {
189 if (msgrcv(msqid, msgp, msgsz - sizeof(long), msgtyp, MSG_COPY | IPC_NOWAIT) <

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected