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: Sun, 1 Feb 2015 21:52:05 -0500 From: green@...uxhacker.ru To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, devel@...verdev.osuosl.org, Andreas Dilger <andreas.dilger@...el.com> Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>, Dmitry Eremin <dmitry.eremin@...el.com>, Oleg Drokin <oleg.drokin@...el.com> Subject: [PATCH 06/20] staging/lustre: fix comparison between signed and unsigned From: Dmitry Eremin <dmitry.eremin@...el.com> Expression if (size != (ssize_t)size) is always false. Therefore no bounds check errors detected. Signed-off-by: Dmitry Eremin <dmitry.eremin@...el.com> Reviewed-on: http://review.whamcloud.com/11376 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5417 Reviewed-by: John L. Hammond <john.hammond@...el.com> Reviewed-by: Fan Yong <fan.yong@...el.com> Signed-off-by: Oleg Drokin <oleg.drokin@...el.com> --- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 89794fd..176bd46 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -1012,7 +1012,7 @@ static inline ssize_t hur_len(struct hsm_user_request *hur) (__u64)hur->hur_request.hr_itemcount * sizeof(hur->hur_user_item[0]) + hur->hur_request.hr_data_len; - if (size != (ssize_t)size) + if (size > ~((size_t)0)>>1) return -1; return size; -- 2.1.0 -- 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