Commit 178583c8 authored by Tiffany Yang's avatar Tiffany Yang
Browse files

ANDROID: crypto: af_alg - Fix assignment from bitfield



A recent security patch in af_alg changed converted bool members of
af_alg_ctx into bitfields. Update assignment to the bitfield to prevent
the following kernelci error:

crypto/af_alg.c: In function ‘af_alg_sendpage’:
crypto/af_alg.c:1033:21: error: overflow in conversion from ‘int’ to ‘unsigned char:1’ changes value from ‘flags & 32768’ to ‘0’ [-Werror=overflow]
 1033 |         ctx->more = flags & MSG_MORE;
      |                     ^~~~~

This line is no longer present in upstream as of commit dc97391e
("sock: Remove ->sendpage*() in favour of sendmsg(MSG_SPLICE_PAGES)"),
which was introduced after 6.1.

Fixes: 22664d1e ("UPSTREAM: crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg")
Bug: 454240277
Change-Id: I5f1a944aeb44eb7a9b181924ef8b82fe79771353
Signed-off-by: default avatarTiffany Yang <ynaffit@google.com>
parent bc9157dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment