libata: reject passthrough WRITE SAME requests
The WRITE SAME to TRIM translation rewrites the DATA OUT buffer. While the SCSI code accomodates for this by passing a read-writable buffer userspace applications don't cater for this behavior. In fact it can be used to rewrite e.g. a readonly file through mmap and should be considered as a security fix. Signed-off-by: NChristoph Hellwig <hch@lst.de> Cc: stable@vger.kernel.org Reviewed-by: NMartin K. Petersen <martin.petersen@oracle.com> Signed-off-by: NTejun Heo <tj@kernel.org>
Showing
想要评论请 注册 或 登录