Go to file
Wang Yufen f93431c86b ipv6: Fix signed integer overflow in __ip6_append_data
Resurrect ubsan overflow checks and ubsan report this warning,
fix it by change the variable [length] type to size_t.

UBSAN: signed-integer-overflow in net/ipv6/ip6_output.c:1489:19
2147479552 + 8567 cannot be represented in type 'int'
CPU: 0 PID: 253 Comm: err Not tainted 5.16.0+ #1
Hardware name: linux,dummy-virt (DT)
Call trace:
  dump_backtrace+0x214/0x230
  show_stack+0x30/0x78
  dump_stack_lvl+0xf8/0x118
  dump_stack+0x18/0x30
  ubsan_epilogue+0x18/0x60
  handle_overflow+0xd0/0xf0
  __ubsan_handle_add_overflow+0x34/0x44
  __ip6_append_data.isra.48+0x1598/0x1688
  ip6_append_data+0x128/0x260
  udpv6_sendmsg+0x680/0xdd0
  inet6_sendmsg+0x54/0x90
  sock_sendmsg+0x70/0x88
  ____sys_sendmsg+0xe8/0x368
  ___sys_sendmsg+0x98/0xe0
  __sys_sendmmsg+0xf4/0x3b8
  __arm64_sys_sendmmsg+0x34/0x48
  invoke_syscall+0x64/0x160
  el0_svc_common.constprop.4+0x124/0x300
  do_el0_svc+0x44/0xc8
  el0_svc+0x3c/0x1e8
  el0t_64_sync_handler+0x88/0xb0
  el0t_64_sync+0x16c/0x170

Changes since v1:
-Change the variable [length] type to unsigned, as Eric Dumazet suggested.
Changes since v2:
-Don't change exthdrlen type in ip6_make_skb, as Paolo Abeni suggested.
Changes since v3:
-Don't change ulen type in udpv6_sendmsg and l2tp_ip6_sendmsg, as
Jakub Kicinski suggested.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Yufen <wangyufen@huawei.com>
Link: https://lore.kernel.org/r/20220607120028.845916-1-wangyufen@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-06-08 10:56:43 -07:00
Documentation Networking fixes for 5.19-rc1, including fixes from bpf, and netfilter. 2022-06-02 12:50:16 -07:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
arch Livepatching changes for 5.19 2022-06-02 08:55:01 -07:00
block Page cache changes for 5.19 2022-05-24 19:55:07 -07:00
certs Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
crypto This update includes the following changes: 2022-05-27 18:06:49 -07:00
drivers nfc: nfcmrvl: Fix memory leak in nfcmrvl_play_deferred 2022-06-08 10:18:10 -07:00
fs A big pile of assorted fixes and improvements for the filesystem with 2022-06-02 08:59:39 -07:00
include ipv6: Fix signed integer overflow in __ip6_append_data 2022-06-08 10:56:43 -07:00
init RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree() 2022-05-09 18:29:21 -07:00
kernel Networking fixes for 5.19-rc1, including fixes from bpf, and netfilter. 2022-06-02 12:50:16 -07:00
lib assoc_array: Fix BUG_ON during garbage collect 2022-06-01 18:29:06 -07:00
mm RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
net ipv6: Fix signed integer overflow in __ip6_append_data 2022-06-08 10:56:43 -07:00
samples drm for 5.19-rc1 2022-05-25 16:18:27 -07:00
scripts Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
security linux-kselftest-kunit-5.19-rc1 2022-05-25 11:32:53 -07:00
sound m68knommu: changes for linux 5.19 2022-05-30 10:56:18 -07:00
tools Merge git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf 2022-06-07 17:49:48 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt VFIO updates for v5.19-rc1 2022-06-01 13:49:15 -07:00
.clang-format clang-format: Fix space after for_each macros 2022-05-20 19:27:16 +02:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore kbuild: split the second line of *.mod into *.usyms 2022-05-08 03:16:59 +09:00
.mailmap MAINTAINERS: Update Lorenzo Pieralisi's email address 2022-05-31 15:06:19 -05:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: replace a Microchip AT91 maintainer 2022-02-09 11:30:01 +01:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS pci-v5.19-fixes-1 2022-06-02 12:11:25 -07:00
Makefile Kbuild updates for v5.19 2022-05-26 12:09:50 -07:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

README

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.