lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 20 Mar 2014 17:05:10 -0700 From: Greg Kroah-Hartman <gregkh@...uxfoundation.org> To: linux-kernel@...r.kernel.org Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, stable@...r.kernel.org, "Martin K. Petersen" <martin.petersen@...cle.com>, Jens Axboe <axboe@...nel.dk>, Christoph Hellwig <hch@....de>, Nicholas Bellinger <nab@...ux-iscsi.org> Subject: [PATCH 3.13 147/149] bio-integrity: Fix bio_integrity_verify segment start bug 3.13-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Bellinger <nab@...ux-iscsi.org> commit 5837c80e870bc3b12ac6a98cdc9ce7a9522a8fb6 upstream. This patch addresses a bug in bio_integrity_verify() code that has been causing DIF READ verify operations to be silently skipped. The issue is that bio->bi_idx will have been incremented within bio_advance() code in the normal blk_update_request() -> req_bio_endio() completion path, and bio_integrity_verify() is using bio_for_each_segment() which starts the bio segment walk at the current bio->bi_idx. So instead use bio_for_each_segment_all() to always start the bio segment walk from zero, regardless of the current bio->bi_idx value after bio_advance() has been called. (Context change for v3.10.y -> v3.13.y code - nab) Cc: Martin K. Petersen <martin.petersen@...cle.com> Cc: Jens Axboe <axboe@...nel.dk> Cc: Christoph Hellwig <hch@....de> Signed-off-by: Nicholas Bellinger <nab@...ux-iscsi.org> Signed-off-by: Jens Axboe <axboe@...nel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org> --- fs/bio-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c @@ -458,7 +458,7 @@ static int bio_integrity_verify(struct b bix.disk_name = bio->bi_bdev->bd_disk->disk_name; bix.sector_size = bi->sector_size; - bio_for_each_segment(bv, bio, i) { + bio_for_each_segment_all(bv, bio, i) { void *kaddr = kmap_atomic(bv->bv_page); bix.data_buf = kaddr + bv->bv_offset; bix.data_size = bv->bv_len; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists