Commit 4cca766
committed
netfilter: nf_ct_ftp: prefer skb_linearize
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2139501
commit c783a29
Author: Florian Westphal <fw@strlen.de>
Date: Tue Aug 9 15:16:34 2022 +0200
netfilter: nf_ct_ftp: prefer skb_linearize
This uses a pseudo-linearization scheme with a 64k global buffer,
but BIG TCP arrival means IPv6 TCP stack can generate skbs
that exceed this size.
Use skb_linearize. It should be possible to rewrite this to properly
deal with segmented skbs (i.e., only do small chunk-wise accesses),
but this is going to be a lot more intrusive than this because every
helper function needs to get the sk_buff instead of a pointer to a raw
data buffer.
In practice, provided we're really looking at FTP control channel packets,
there should never be a case where we deal with huge packets.
Fixes: 7c4e983 ("net: allow gso_max_size to exceed 65536")
Fixes: 0fe79f2 ("net: allow gro_max_size to exceed 65536")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>1 parent 10f6670 commit 4cca766
1 file changed
+6
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
398 | 393 | | |
399 | 394 | | |
400 | 395 | | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
401 | 399 | | |
402 | 400 | | |
403 | 401 | | |
| |||
411 | 409 | | |
412 | 410 | | |
413 | 411 | | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
| 412 | + | |
| 413 | + | |
420 | 414 | | |
421 | 415 | | |
422 | 416 | | |
| |||
544 | 538 | | |
545 | 539 | | |
546 | 540 | | |
547 | | - | |
| 541 | + | |
548 | 542 | | |
549 | 543 | | |
550 | 544 | | |
| |||
571 | 565 | | |
572 | 566 | | |
573 | 567 | | |
574 | | - | |
575 | 568 | | |
576 | 569 | | |
577 | 570 | | |
| |||
580 | 573 | | |
581 | 574 | | |
582 | 575 | | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | 576 | | |
588 | 577 | | |
589 | 578 | | |
| |||
603 | 592 | | |
604 | 593 | | |
605 | 594 | | |
606 | | - | |
607 | 595 | | |
608 | 596 | | |
609 | 597 | | |
| |||
0 commit comments