[LU-17517] shift exponent 65 is too large for 64-bit type in lov_request.c Created: 08/Feb/24 Updated: 09/Feb/24 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.15.4 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Åke Sandgren | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
One of our clients just gave us this: [ 201.440391] UBSAN: shift-out-of-bounds in /var/lib/dkms/lustre-client-modules/2.15.4-hpc2n0.2/build/lustre/lov/lov_request.c:230:23
|
| Comments |
| Comment by Tim Day [ 09/Feb/24 ] |
|
Seems like in `lov_update_statfs()`, the logic
is wrong. If we finish the loop without breaking, `shift` will be 65. I think if `shift` is 64, that's also undefined behavior. It'd have to be capped at 63. |