Created attachment 164914 [details] Patch for improved initialisation checks for I2C_RDWR syscall The argument structures for this syscall contain padding. The current code will always fail, as the padding is not initialised. The structures in question are from linux/i2c-dev.h: struct i2c_rdwr_ioctl_data { struct i2c_msg *msgs; /* pointers to i2c_msgs */ __u32 nmsgs; /* number of i2c_msgs */ // Padding here (on 64bit machines) }; and from linux/i2c.h: struct i2c_msg { __u16 addr; __u16 flags; __u16 len; // Padding here __u8 *buf; }; Patch to check the individual fields instead is attached.