Commit 1b6558c
committed
crypto: algif_aead - Revert to operating out-of-place
jira VULN-181881
cve CVE-2026-31431
commit-author Herbert Xu <herbert@gondor.apana.org.au>
commit a664bf3
upstream-diff |
This kernel lacks upstream commits c1abe6f ("crypto: af_alg:
Use extract_iter_to_sg() to create scatterlists") and f2804d0
("crypto: algif_aead - use memcpy_sglist() instead of null
skcipher"). As a result, there are two conflicts: the scatterlist
table is located in a different member of `struct af_alg_sgl` and
the null skcipher is used for copying between scatterlists instead
of memcpy_sglist() (which is a helper that doesn't exist in this
kernel version).
The scatterlist table discrepancy is resolved by using the correct
member of `struct af_alg_sgl`.
The upstream patch's usage of memcpy_sglist() is replaced by a call
to the null skcipher to perform the scatterlist copy instead.
This mostly reverts commit 72548b0 except for the copying of
the associated data.
There is no benefit in operating in-place in algif_aead since the
source and destination come from different mappings. Get rid of
all the complexity added for in-place operation and just copy the
AD directly.
Fixes: 72548b0 ("crypto: algif_aead - copy AAD from src to dst")
Reported-by: Taeyang Lee <0wn@theori.io>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit a664bf3)
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>1 parent 1ec6863 commit 1b6558c
4 files changed
Lines changed: 37 additions & 131 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
529 | | - | |
| 528 | + | |
530 | 529 | | |
531 | 530 | | |
532 | 531 | | |
533 | | - | |
534 | 532 | | |
535 | 533 | | |
536 | | - | |
| 534 | + | |
537 | 535 | | |
538 | 536 | | |
539 | 537 | | |
| |||
548 | 546 | | |
549 | 547 | | |
550 | 548 | | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
559 | | - | |
560 | | - | |
561 | | - | |
562 | | - | |
563 | 549 | | |
564 | | - | |
565 | | - | |
566 | | - | |
| 550 | + | |
567 | 551 | | |
568 | 552 | | |
569 | | - | |
| 553 | + | |
570 | 554 | | |
571 | 555 | | |
572 | 556 | | |
| |||
578 | 562 | | |
579 | 563 | | |
580 | 564 | | |
581 | | - | |
582 | | - | |
583 | | - | |
| 565 | + | |
584 | 566 | | |
585 | 567 | | |
586 | 568 | | |
587 | 569 | | |
588 | 570 | | |
589 | | - | |
590 | | - | |
591 | 571 | | |
592 | | - | |
593 | | - | |
| 572 | + | |
594 | 573 | | |
595 | 574 | | |
596 | 575 | | |
| |||
615 | 594 | | |
616 | 595 | | |
617 | 596 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
630 | 601 | | |
631 | 602 | | |
632 | 603 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
96 | 95 | | |
97 | 96 | | |
98 | 97 | | |
99 | | - | |
| 98 | + | |
100 | 99 | | |
101 | | - | |
102 | 100 | | |
103 | 101 | | |
104 | 102 | | |
| |||
178 | 176 | | |
179 | 177 | | |
180 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
181 | 183 | | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
196 | 192 | | |
197 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
198 | 197 | | |
199 | 198 | | |
200 | 199 | | |
| |||
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 205 | | |
211 | 206 | | |
212 | 207 | | |
213 | 208 | | |
214 | 209 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
278 | 214 | | |
279 | 215 | | |
280 | | - | |
| 216 | + | |
281 | 217 | | |
282 | 218 | | |
283 | 219 | | |
| |||
526 | 462 | | |
527 | 463 | | |
528 | 464 | | |
529 | | - | |
| 465 | + | |
530 | 466 | | |
531 | 467 | | |
532 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
316 | | - | |
| 316 | + | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
230 | | - | |
231 | | - | |
| 229 | + | |
| 230 | + | |
232 | 231 | | |
233 | 232 | | |
234 | 233 | | |
| |||
0 commit comments