Go to file
John Fastabend dc9dfc8dc6 net: tls, fix WARNIING in __sk_msg_free
A splice with MSG_SPLICE_PAGES will cause tls code to use the
tls_sw_sendmsg_splice path in the TLS sendmsg code to move the user
provided pages from the msg into the msg_pl. This will loop over the
msg until msg_pl is full, checked by sk_msg_full(msg_pl). The user
can also set the MORE flag to hint stack to delay sending until receiving
more pages and ideally a full buffer.

If the user adds more pages to the msg than can fit in the msg_pl
scatterlist (MAX_MSG_FRAGS) we should ignore the MORE flag and send
the buffer anyways.

What actually happens though is we abort the msg to msg_pl scatterlist
setup and then because we forget to set 'full record' indicating we
can no longer consume data without a send we fallthrough to the 'continue'
path which will check if msg_data_left(msg) has more bytes to send and
then attempts to fit them in the already full msg_pl. Then next
iteration of sender doing send will encounter a full msg_pl and throw
the warning in the syzbot report.

To fix simply check if we have a full_record in splice code path and
if not send the msg regardless of MORE flag.

Reported-and-tested-by: syzbot+f2977222e0e95cec15c8@syzkaller.appspotmail.com
Reported-by: Edward Adam Davis <eadavis@qq.com>
Fixes: fe1e81d4f7 ("tls/sw: Support MSG_SPLICE_PAGES")
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-14 12:17:14 +00:00
arch Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
block Many singleton patches against the MM code. The patch series which 2024-01-09 11:18:47 -08:00
certs This update includes the following changes: 2023-11-02 16:15:30 -10:00
crypto crypto: scomp - fix req->dst buffer overflow 2023-12-29 11:25:56 +08:00
Documentation Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
drivers net: stmmac: Fix ethool link settings ops for integrated PCS 2024-01-13 12:41:50 +00:00
fs Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
include net: netdev_queue: netdev_txq_completed_mb(): fix wake condition 2024-01-13 18:26:23 +00:00
init header cleanups for 6.8 2024-01-10 16:43:55 -08:00
io_uring Many singleton patches against the MM code. The patch series which 2024-01-09 11:18:47 -08:00
ipc shm: Slim down dependencies 2023-12-20 19:26:31 -05:00
kernel Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
lib Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
LICENSES LICENSES: Add the copyleft-next-0.3.1 license 2022-11-08 15:44:01 +01:00
mm Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
net net: tls, fix WARNIING in __sk_msg_free 2024-01-14 12:17:14 +00:00
rust net: phy: add Rust Asix PHY driver 2023-12-15 09:35:50 +00:00
samples Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
scripts Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
security header cleanups for 6.8 2024-01-10 16:43:55 -08:00
sound linux_kselftest-kunit-6.8-rc1 2024-01-09 17:16:58 -08:00
tools selftests: rtnetlink: check enslaving iface in a bond 2024-01-11 16:47:40 -08:00
usr usr/Kconfig: fix typos of "its" 2023-12-20 15:02:58 -08:00
virt vfs-6.8.misc 2024-01-08 10:26:08 -08:00
.clang-format iommu: Add for_each_group_device() 2023-05-23 08:15:51 +02:00
.cocciconfig
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: set diff driver for Rust source code files 2023-05-31 17:48:25 +02:00
.gitignore kbuild: rpm-pkg: generate kernel.spec in rpmbuild/SPECS/ 2023-10-03 20:49:09 +09:00
.mailmap Networking changes for 6.8. 2024-01-11 10:07:29 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: mark ax25 as Orphan 2024-01-11 16:25:04 -08:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS MAINTAINERS: ibmvnic: drop Dany from reviewers 2024-01-11 16:25:04 -08:00
Makefile Quite a lot of kexec work this time around. Many singleton patches in 2024-01-09 11:46:20 -08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.