Fix CAS HAL integer truncation vulnerability

CAS HAL IDescrambler::descramble has an int64 to int32 offset truncation
issue at the plugin ABI boundary, which could lead to an out-of-bounds
write/read in hal_cas_default. This adds validation to check that the
offsets are within the INT32 bounds before calling the plugin ABI.

Bug: 517593332
Test: atest VtsHalCasAidlTargetTest
Flag: EXEMPT BUGFIX
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:0fe36310a6960d859aa392e39d29ced62731b4de
Merged-In: Ibc4ed7afadc0c8a30876465f03bc1cc00024d27d
Change-Id: Ibc4ed7afadc0c8a30876465f03bc1cc00024d27d
4 files changed