Backport request: commit fe92f874f091 ("net: Fix from address in memcpy_to_iter_csum()")

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please backport to stable 6.7 the following patch which was merged upstream as

commit fe92f874f09145a6951deacaa4961390238bbe0d
Author: Michael Lass <bevan@xxxxxxxxx>
Date:   Wed Jan 31 16:52:20 2024 +0100

    net: Fix from address in memcpy_to_iter_csum()

    While inlining csum_and_memcpy() into memcpy_to_iter_csum(), the from
    address passed to csum_partial_copy_nocheck() was accidentally changed.
    This causes a regression in applications using UDP, as for example
    OpenAFS, causing loss of datagrams.

    Fixes: dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()")
    Cc: David Howells <dhowells@xxxxxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx
    Cc: regressions@xxxxxxxxxxxxxxx
    Signed-off-by: Michael Lass <bevan@xxxxxxxxx>
    Reviewed-by: Jeffrey Altman <jaltman@xxxxxxxxxxxx>
    Acked-by: David Howells <dhowells@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>


Thank you.

-------- Forwarded Message --------
Subject: 	[PATCH] net: Fix from address in memcpy_to_iter_csum()
Date: 	Wed, 31 Jan 2024 16:52:20 +0100
From: 	Michael Lass <bevan@xxxxxxxxx>
To: 	netdev@xxxxxxxxxxxxxxx
CC: 	David Howells <dhowells@xxxxxxxxxx>, regressions@xxxxxxxxxxxxxxx



While inlining csum_and_memcpy() into memcpy_to_iter_csum(), the from
address passed to csum_partial_copy_nocheck() was accidentally changed.
This causes a regression in applications using UDP, as for example
OpenAFS, causing loss of datagrams.

Fixes: dc32bff195b4 ("iov_iter, net: Fold in csum_and_memcpy()")
Cc: David Howells <dhowells@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Cc: regressions@xxxxxxxxxxxxxxx
Signed-off-by: Michael Lass <bevan@xxxxxxxxx>
---
net/core/datagram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/datagram.c b/net/core/datagram.c
index 103d46fa0eeb..a8b625abe242 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -751,7 +751,7 @@ size_t memcpy_to_iter_csum(void *iter_to, size_t progress,
size_t len, void *from, void *priv2)
{
__wsum *csum = priv2;
- __wsum next = csum_partial_copy_nocheck(from, iter_to, len);
+ __wsum next = csum_partial_copy_nocheck(from + progress, iter_to, len);
*csum = csum_block_add(*csum, next, progress);
return 0;

--
2.43.0







[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux