When proxying IPv6 NDP requests, the adverts to the initial multicast
solicits are correct and working. On the other hand, when later a
reachability confirmation is requested (on unicast), no reply is sent.
This causes the neighbor entry expiring on the sending node, which is
mostly a non-issue, as a new multicast request is sent. There are
routers, where the multicast requests are intentionally delayed, and in
these environments the current implementation causes periodic packet
loss for the proxied endpoints.
The root cause is the erroneous decrease of the hop limit, as this
is checked in ndisc.c and no answer is generated when it's 254 instead
of the correct 255.
Cc: stable(a)vger.kernel.org
Fixes: 46c7655f0b56 ("ipv6: decrease hop limit counter in ip6_forward()")
Signed-off-by: Gergely Risko <gergely.risko(a)gmail.com>
Tested-by: Gergely Risko <gergely.risko(a)gmail.com>
Reviewed-by: David Ahern <dsahern(a)kernel.org>
---
net/ipv6/ip6_output.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 60fd91bb5171..c314fdde0097 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -547,7 +547,20 @@ int ip6_forward(struct sk_buff *skb)
pneigh_lookup(&nd_tbl, net, &hdr->daddr, skb->dev, 0)) {
int proxied = ip6_forward_proxy_check(skb);
if (proxied > 0) {
- hdr->hop_limit--;
+ /* It's tempting to decrease the hop limit
+ * here by 1, as we do at the end of the
+ * function too.
+ *
+ * But that would be incorrect, as proxying is
+ * not forwarding. The ip6_input function
+ * will handle this packet locally, and it
+ * depends on the hop limit being unchanged.
+ *
+ * One example is the NDP hop limit, that
+ * always has to stay 255, but other would be
+ * similar checks around RA packets, where the
+ * user can even change the desired limit.
+ */
return ip6_input(skb);
} else if (proxied < 0) {
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
--
2.39.0
This is the start of the stable review cycle for the 5.4.230 release.
There are 55 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Tue, 24 Jan 2023 15:02:08 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.230-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.230-rc1
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/vmlinux.lds: Don't discard .comment
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/vmlinux.lds: Don't discard .rela* for relocatable builds
Michael Ellerman <mpe(a)ellerman.id.au>
powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT
Masahiro Yamada <masahiroy(a)kernel.org>
s390: define RUNTIME_DISCARD_EXIT to fix link error with GNU ld < 2.36
Masahiro Yamada <masahiroy(a)kernel.org>
arch: fix broken BuildID for arm64 and riscv
YingChi Long <me(a)inclyc.cn>
x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN
Joshua Ashton <joshua(a)froggi.es>
drm/amd/display: Fix COLOR_SPACE_YCBCR2020_TYPE matrix
hongao <hongao(a)uniontech.com>
drm/amd/display: Fix set scaling doesn's work
Sasa Dragic <sasa.dragic(a)gmail.com>
drm/i915: re-disable RC6p on Sandy Bridge
Khazhismel Kumykov <khazhy(a)chromium.org>
gsmi: fix null-deref in gsmi_get_variable
Tobias Schramm <t.schramm(a)manjaro.org>
serial: atmel: fix incorrect baudrate setup
Mohan Kumar <mkumard(a)nvidia.com>
dmaengine: tegra210-adma: fix global intr clear
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
serial: pch_uart: Pass correct sg to dma_unmap_sg()
Heiner Kallweit <hkallweit1(a)gmail.com>
dt-bindings: phy: g12a-usb3-pcie-phy: fix compatible string documentation
Juhyung Park <qkrwngud825(a)gmail.com>
usb-storage: apply IGNORE_UAS only for HIKSEMI MD202 on RTL9210
Maciej Żenczykowski <maze(a)google.com>
usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate()
Daniel Scally <dan.scally(a)ideasonboard.com>
usb: gadget: g_webcam: Send color matching descriptor per frame
Prashant Malani <pmalani(a)chromium.org>
usb: typec: altmodes/displayport: Fix pin assignment calculation
Prashant Malani <pmalani(a)chromium.org>
usb: typec: altmodes/displayport: Add pin assignment helper
Alexander Stein <alexander.stein(a)ew.tq-group.com>
usb: host: ehci-fsl: Fix module alias
Michael Adler <michael.adler(a)siemens.com>
USB: serial: cp210x: add SCALANCE LPE-9000 device id
Alan Stern <stern(a)rowland.harvard.edu>
USB: gadgetfs: Fix race between mounting and unmounting
Enzo Matsumiya <ematsumiya(a)suse.de>
cifs: do not include page data when checking signature
Filipe Manana <fdmanana(a)suse.com>
btrfs: fix race between quota rescan and disable leading to NULL pointer deref
Samuel Holland <samuel(a)sholland.org>
mmc: sunxi-mmc: Fix clock refcount imbalance during unbind
Ian Abbott <abbotti(a)mev.co.uk>
comedi: adv_pci1760: Fix PWM instruction handling
Flavio Suligoi <f.suligoi(a)asem.it>
usb: core: hub: disable autosuspend for TI TUSB8041
Ola Jeppsson <ola(a)snap.com>
misc: fastrpc: Fix use-after-free race condition for maps
Abel Vesa <abel.vesa(a)linaro.org>
misc: fastrpc: Don't remove map on creater_process and device_release
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100
Duke Xin(辛安文) <duke_xinanwen(a)163.com>
USB: serial: option: add Quectel EM05CN modem
Duke Xin(辛安文) <duke_xinanwen(a)163.com>
USB: serial: option: add Quectel EM05CN (SG) modem
Ali Mirghasemi <ali.mirghasemi1376(a)gmail.com>
USB: serial: option: add Quectel EC200U modem
Duke Xin(辛安文) <duke_xinanwen(a)163.com>
USB: serial: option: add Quectel EM05-G (RS) modem
Duke Xin(辛安文) <duke_xinanwen(a)163.com>
USB: serial: option: add Quectel EM05-G (CS) modem
Duke Xin(辛安文) <duke_xinanwen(a)163.com>
USB: serial: option: add Quectel EM05-G (GR) modem
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
prlimit: do_prlimit needs to have a speculation check
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Detect lpm incapable xHC USB3 roothub ports from ACPI tables
Mathias Nyman <mathias.nyman(a)linux.intel.com>
usb: acpi: add helper to check port lpm capability using acpi _DSM
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Add a flag to disable USB3 lpm on a xhci root port level.
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Add update_hub_device override for PCI xHCI hosts
Mathias Nyman <mathias.nyman(a)linux.intel.com>
xhci: Fix null pointer dereference when host dies
Jimmy Hu <hhhuuu(a)google.com>
usb: xhci: Check endpoint is valid before dereferencing it
Ricardo Ribalda <ribalda(a)chromium.org>
xhci-pci: set the dma max_seg_size
Yuchi Yang <yangyuchi66(a)gmail.com>
ALSA: hda/realtek - Turn on power early
Chris Wilson <chris(a)chris-wilson.co.uk>
drm/i915/gt: Reset twice
Ding Hui <dinghui(a)sangfor.com.cn>
efi: fix userspace infinite retry read efivars after EFI runtime services page fault
Ryusuke Konishi <konishi.ryusuke(a)gmail.com>
nilfs2: fix general protection fault in nilfs_btree_insert()
Shawn.Shao <shawn.shao(a)jaguarmicro.com>
Add exception protection processing for vd in axi_chan_handle_err function
Arend van Spriel <arend.vanspriel(a)broadcom.com>
wifi: brcmfmac: fix regression for Broadcom PCIe wifi devices
Jaegeuk Kim <jaegeuk(a)kernel.org>
f2fs: let's avoid panic if extent_tree is not created
Jiri Slaby (SUSE) <jirislaby(a)kernel.org>
RDMA/srp: Move large values to a new enum for gcc13
Daniil Tatianin <d-tatianin(a)yandex-team.ru>
net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats
Hao Sun <sunhao.th(a)gmail.com>
selftests/bpf: check null propagation only neither reg is PTR_TO_BTF_ID
Olga Kornievskaia <olga.kornievskaia(a)gmail.com>
pNFS/filelayout: Fix coalescing test for single DS
-------------
Diffstat:
...ie-phy.yaml => amlogic,g12a-usb3-pcie-phy.yaml} | 6 +-
Makefile | 4 +-
arch/powerpc/kernel/vmlinux.lds.S | 6 +-
arch/s390/kernel/vmlinux.lds.S | 2 +
arch/x86/kernel/fpu/init.c | 7 +--
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 6 ++
drivers/dma/tegra210-adma.c | 2 +-
drivers/firmware/efi/runtime-wrappers.c | 1 +
drivers/firmware/google/gsmi.c | 7 ++-
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +-
.../gpu/drm/amd/display/dc/core/dc_hw_sequencer.c | 4 +-
drivers/gpu/drm/i915/gt/intel_reset.c | 34 +++++++++--
drivers/gpu/drm/i915/i915_pci.c | 3 +-
drivers/infiniband/ulp/srp/ib_srp.h | 8 ++-
drivers/misc/fastrpc.c | 26 +++++----
drivers/mmc/host/sunxi-mmc.c | 8 ++-
.../wireless/broadcom/brcm80211/brcmfmac/pcie.c | 2 +-
drivers/staging/comedi/drivers/adv_pci1760.c | 2 +-
drivers/tty/serial/atmel_serial.c | 8 +--
drivers/tty/serial/pch_uart.c | 2 +-
drivers/usb/core/hub.c | 13 +++++
drivers/usb/core/usb-acpi.c | 65 ++++++++++++++++++++++
drivers/usb/gadget/function/f_ncm.c | 4 +-
drivers/usb/gadget/legacy/inode.c | 28 +++++++---
drivers/usb/gadget/legacy/webcam.c | 3 +
drivers/usb/host/ehci-fsl.c | 2 +-
drivers/usb/host/xhci-pci.c | 45 +++++++++++++++
drivers/usb/host/xhci-ring.c | 5 +-
drivers/usb/host/xhci.c | 18 +++++-
drivers/usb/host/xhci.h | 5 ++
drivers/usb/misc/iowarrior.c | 2 +-
drivers/usb/serial/cp210x.c | 1 +
drivers/usb/serial/option.c | 17 ++++++
drivers/usb/storage/uas-detect.h | 13 +++++
drivers/usb/storage/unusual_uas.h | 7 ---
drivers/usb/typec/altmodes/displayport.c | 22 +++++---
fs/btrfs/qgroup.c | 25 ++++++---
fs/cifs/smb2pdu.c | 15 +++--
fs/f2fs/extent_cache.c | 3 +-
fs/nfs/filelayout/filelayout.c | 8 +++
fs/nilfs2/btree.c | 15 ++++-
include/asm-generic/vmlinux.lds.h | 5 ++
include/linux/usb.h | 3 +
kernel/sys.c | 2 +
net/core/ethtool.c | 3 +-
sound/pci/hda/patch_realtek.c | 30 +++++-----
.../selftests/bpf/prog_tests/jeq_infer_not_null.c | 9 +++
.../selftests/bpf/progs/jeq_infer_not_null_fail.c | 42 ++++++++++++++
48 files changed, 438 insertions(+), 114 deletions(-)