Beispiel #1
0
static void generic_sanitise_ioctl(struct syscallrecord *rec)
{
	if (ONE_IN(50))
		ioctl_mangle_cmd(rec);

	ioctl_mangle_arg(rec);
}
Beispiel #2
0
static void generic_sanitise_ioctl(struct syscallrecord *rec)
{
	if ((rand() % 50)==0)
		ioctl_mangle_cmd(rec);

	ioctl_mangle_arg(rec);
}
Beispiel #3
0
static void sanitise_ioctl(struct syscallrecord *rec)
{
	const struct ioctl_group *grp;

	if (ONE_IN(100))
		grp = get_random_ioctl_group();
	else
		grp = find_ioctl_group(rec->a1);

	if (grp) {
		ioctl_mangle_arg(rec);

		grp->sanitise(grp, rec);

		if (ONE_IN(100))
			ioctl_mangle_cmd(rec);
	} else
		generic_sanitise_ioctl(rec);
}