[LU-15329] Possible integer overflow in quota_read_blk Created: 07/Dec/21  Updated: 07/Dec/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.15.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Oleg Drokin Assignee: WC Triage
Resolution: Unresolved Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In osd-ldiskfs quota_read_blk we have this bit:

        ret = sb->s_op->quota_read(sb, type, buf, LUSTRE_DQBLKSIZE,
                                   blk << LUSTRE_DQBLKSIZE_BITS); 

where blk is uint and LUSTRE_DQBLKSIZE_BITS is 10. the last quota_read argument is loff_t, as such cast to some 64 bit type seems warranted to avoid a potential overflow.


Generated at Sat Feb 10 03:17:23 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.