Commit c7ec4f2
xen-netback: don't produce zero-size SKB frags
While frontends may submit zero-size requests (wasting a precious slot),
core networking code as of at least 3ece782 ("sock: skb_copy_ubufs
support for compound pages") can't deal with SKBs when they have all
zero-size fragments. Respond to empty requests right when populating
fragments; all further processing is fragment based and hence won't
encounter these empty requests anymore.
In a way this should have been that way from the beginning: When no data
is to be transferred for a particular request, there's not even a point
in validating the respective grant ref. That's no different from e.g.
passing NULL into memcpy() when at the same time the size is 0.
This is XSA-448 / CVE-2023-46838.
Cc: stable@vger.kernel.org
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>1 parent 0dd3ee3 commit c7ec4f2
1 file changed
Lines changed: 38 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
467 | 478 | | |
468 | 479 | | |
469 | 480 | | |
470 | 481 | | |
471 | 482 | | |
| 483 | + | |
| 484 | + | |
472 | 485 | | |
473 | 486 | | |
474 | 487 | | |
| |||
481 | 494 | | |
482 | 495 | | |
483 | 496 | | |
484 | | - | |
485 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
486 | 510 | | |
487 | 511 | | |
488 | 512 | | |
489 | 513 | | |
490 | 514 | | |
491 | 515 | | |
| 516 | + | |
| 517 | + | |
492 | 518 | | |
493 | 519 | | |
494 | | - | |
495 | | - | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
496 | 527 | | |
497 | | - | |
| 528 | + | |
| 529 | + | |
498 | 530 | | |
499 | 531 | | |
500 | 532 | | |
| |||
0 commit comments