summaryrefslogtreecommitdiffstats
path: root/include/scsi/libiscsi_tcp.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2012-01-26 21:13:10 -0600
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 08:09:00 -0600
commit1304be5fe0efb42b7ec6a50dd8e1a9bce2adae17 (patch)
treebc3d95ab7c1cc5d779df4696aaa138b7cbd89825 /include/scsi/libiscsi_tcp.h
parentdf1c7baba1b7b3053950f3845a6575aca47ba9ce (diff)
downloadlinux-1304be5fe0efb42b7ec6a50dd8e1a9bce2adae17.tar.gz
linux-1304be5fe0efb42b7ec6a50dd8e1a9bce2adae17.tar.bz2
linux-1304be5fe0efb42b7ec6a50dd8e1a9bce2adae17.zip
[SCSI] libiscsi_tcp: fix max_r2t manipulation
Problem description from Xi Wang: A large max_r2t could lead to integer overflow in subsequent call to iscsi_tcp_r2tpool_alloc(), allocating a smaller buffer than expected and leading to out-of-bounds write. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/libiscsi_tcp.h')
-rw-r--r--include/scsi/libiscsi_tcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/libiscsi_tcp.h b/include/scsi/libiscsi_tcp.h
index ac0cc1d925ef..215469a9b801 100644
--- a/include/scsi/libiscsi_tcp.h
+++ b/include/scsi/libiscsi_tcp.h
@@ -128,7 +128,7 @@ extern void iscsi_tcp_conn_teardown(struct iscsi_cls_conn *cls_conn);
/* misc helpers */
extern int iscsi_tcp_r2tpool_alloc(struct iscsi_session *session);
extern void iscsi_tcp_r2tpool_free(struct iscsi_session *session);
-
+extern int iscsi_tcp_set_max_r2t(struct iscsi_conn *conn, char *buf);
extern void iscsi_tcp_conn_get_stats(struct iscsi_cls_conn *cls_conn,
struct iscsi_stats *stats);
#endif /* LIBISCSI_TCP_H */