Double free vulnerability in the sg_common_write function in drivers/scsi/sg.c in the Linux kernel before 4.4 allows local users to gain privileges or cause a denial of service (memory corruption and system crash) by detaching a device during an SG_IO ioctl call.
https://source.android.com/security/bulletin/2016-11-01.html
https://github.com/torvalds/linux/commit/f3951a3709ff50990bf3e188c27d346792103432