From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev, YueHaibing <yuehaibing@huawei.com>,
Jon Maloy <jmaloy@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 4.19 025/105] tipc: check skb_linearize() return value in tipc_disc_rcv()
Date: Mon, 5 Dec 2022 20:08:57 +0100 [thread overview]
Message-ID: <20221205190803.994270275@linuxfoundation.org> (raw)
In-Reply-To: <20221205190803.124472741@linuxfoundation.org>
From: YueHaibing <yuehaibing@huawei.com>
[ Upstream commit cd0f6421162201e4b22ce757a1966729323185eb ]
If skb_linearize() fails in tipc_disc_rcv(), we need to free the skb instead of
handle it.
Fixes: 25b0b9c4e835 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Link: https://lore.kernel.org/r/20221119072832.7896-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/tipc/discover.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index 0006c9f87199..0436c8f2967d 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -208,7 +208,10 @@ void tipc_disc_rcv(struct net *net, struct sk_buff *skb,
u32 self;
int err;
- skb_linearize(skb);
+ if (skb_linearize(skb)) {
+ kfree_skb(skb);
+ return;
+ }
hdr = buf_msg(skb);
if (caps & TIPC_NODE_ID128)
--
2.35.1
next prev parent reply other threads:[~2022-12-05 19:24 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-05 19:08 [PATCH 4.19 000/105] 4.19.268-rc1 review Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 001/105] wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 002/105] audit: fix undefined behavior in bit shift for AUDIT_BIT Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 003/105] wifi: mac80211: Fix ack frame idr leak when mesh has no route Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 004/105] spi: stm32: fix stm32_spi_prepare_mbr() that halves spi clk for every run Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 005/105] drm: panel-orientation-quirks: Add quirk for Acer Switch V 10 (SW5-017) Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 006/105] RISC-V: vdso: Do not add missing symbols to version section in linker script Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 007/105] MIPS: pic32: treat port as signed integer Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 008/105] af_key: Fix send_acquire race with pfkey_register Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 009/105] ARM: dts: am335x-pcm-953: Define fixed regulators in root node Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 010/105] ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 011/105] bus: sunxi-rsb: Support atomic transfers Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 012/105] ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 013/105] nfc/nci: fix race with opening and closing Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 014/105] net: pch_gbe: fix potential memleak in pch_gbe_tx_queue() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 015/105] 9p/fd: fix issue of list_del corruption in p9_fd_cancel() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 016/105] ARM: mxs: fix memory leak in mxs_machine_init() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 017/105] net/mlx4: Check retval of mlx4_bitmap_init Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 018/105] net/qla3xxx: fix potential memleak in ql3xxx_send() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 019/105] net: pch_gbe: fix pci device refcount leak while module exiting Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 020/105] Drivers: hv: vmbus: fix double free in the error path of vmbus_add_channel_work() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 021/105] Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 022/105] net/mlx5: Fix FW tracer timestamp calculation Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 023/105] tipc: set con sock in tipc_conn_alloc Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 024/105] tipc: add an extra conn_get " Greg Kroah-Hartman
2022-12-05 19:08 ` Greg Kroah-Hartman [this message]
2022-12-05 19:08 ` [PATCH 4.19 026/105] xfrm: Fix ignored return value in xfrm6_init() Greg Kroah-Hartman
2022-12-05 19:08 ` [PATCH 4.19 027/105] NFC: nci: fix memory leak in nci_rx_data_packet() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 028/105] bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 029/105] dccp/tcp: Reset saddr on failure after inet6?_hash_connect() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 030/105] s390/dasd: fix no record found for raw_track_access Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 031/105] nfc: st-nci: fix incorrect validating logic in EVT_TRANSACTION Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 032/105] nfc: st-nci: fix memory leaks " Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 033/105] net: thunderx: Fix the ACPI memory leak Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 034/105] s390/crashdump: fix TOD programmable field size Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 035/105] arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 036/105] iio: light: apds9960: fix wrong register for gesture gain Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 037/105] iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 038/105] nios2: add FORCE for vmlinuz.gz Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 039/105] iio: ms5611: Simplify IO callback parameters Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 040/105] iio: pressure: ms5611: fixed value compensation bug Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 041/105] ceph: do not update snapshot context when there is no new snapshot Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 042/105] ceph: avoid putting the realm twice when decoding snaps fails Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 044/105] Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 045/105] serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 046/105] xen/platform-pci: add missing free_irq() in error path Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 047/105] platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 048/105] platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017) Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 049/105] platform/x86: hp-wmi: Ignore Smart Experience App event Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 050/105] tcp: configurable source port perturb table size Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 051/105] net: usb: qmi_wwan: add Telit 0x103a composition Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 052/105] dm integrity: flush the journal on suspend Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 053/105] btrfs: free btrfs_path before copying root refs to userspace Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 054/105] btrfs: free btrfs_path before copying fspath " Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 055/105] btrfs: free btrfs_path before copying subvol info " Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 056/105] drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 057/105] drm/amdgpu: always register an MMU notifier for userptr Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 058/105] btrfs: free btrfs_path before copying inodes to userspace Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 059/105] spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 060/105] kbuild: fix -Wimplicit-function-declaration in license_is_gpl_compatible Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 061/105] iio: health: afe4403: Fix oob read in afe4403_read_raw Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 062/105] iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 063/105] iio: light: rpr0521: add missing Kconfig dependencies Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 064/105] scripts/faddr2line: Fix regression in name resolution on ppc64le Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 065/105] hwmon: (i5500_temp) fix missing pci_disable_device() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 066/105] hwmon: (ibmpex) Fix possible UAF when ibmpex_register_bmc() fails Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 067/105] of: property: decrement node refcount in of_fwnode_get_reference_args() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 068/105] net/mlx5: Fix uninitialized variable bug in outlen_write() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 069/105] can: sja1000_isa: sja1000_isa_probe(): add missing free_sja1000dev() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 070/105] can: cc770: cc770_isa_probe(): add missing free_cc770dev() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 071/105] qlcnic: fix sleep-in-atomic-context bugs caused by msleep Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 072/105] net: phy: fix null-ptr-deref while probe() failed Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 073/105] net: net_netdev: Fix error handling in ntb_netdev_init_module() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 074/105] net/9p: Fix a potential socket leak in p9_socket_open Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 075/105] dsa: lan9303: Correct stat name Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 076/105] net: hsr: Fix potential use-after-free Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 077/105] net: tun: Fix use-after-free in tun_detach() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 078/105] packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 079/105] net: ethernet: renesas: ravb: Fix promiscuous mode after system resumed Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 080/105] hwmon: (coretemp) Check for null before removing sysfs attrs Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 081/105] hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 082/105] btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 083/105] error-injection: Add prompt for function error injection Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 084/105] tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 085/105] nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry() Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 086/105] x86/bugs: Make sure MSR_SPEC_CTRL is updated properly upon resume from S3 Greg Kroah-Hartman
2022-12-05 19:09 ` [PATCH 4.19 087/105] pinctrl: intel: Save and restore pins in "direct IRQ" mode Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 088/105] arm64: Fix panic() when Spectre-v2 causes Spectre-BHB to re-allocate KVM vectors Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 089/105] arm64: errata: Fix KVM Spectre-v2 mitigation selection for Cortex-A57/A72 Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 090/105] mm: Fix .data.once orphan section warning Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 091/105] ASoC: ops: Fix bounds check for _sx controls Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 092/105] pinctrl: single: Fix potential division by zero Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 093/105] iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init() Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 094/105] parisc: Increase size of gcc stack frame check Greg Kroah-Hartman
2022-12-05 19:27 ` Arnd Bergmann
2022-12-05 19:58 ` Helge Deller
2022-12-05 20:36 ` Arnd Bergmann
2022-12-05 20:52 ` John David Anglin
2022-12-05 19:10 ` [PATCH 4.19 095/105] xtensa: increase " Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 096/105] parisc: Increase FRAME_WARN to 2048 bytes on parisc Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 097/105] Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 098/105] tcp/udp: Fix memory leak in ipv6_renew_options() Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 099/105] nvme: restrict management ioctls to admin Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 100/105] x86/tsx: Add a feature bit for TSX control MSR support Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 101/105] x86/pm: Add enumeration check before spec MSRs save/restore setup Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 102/105] Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 103/105] x86/ioremap: Fix page aligned size calculation in __ioremap_caller() Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 104/105] mmc: sdhci: use FIELD_GET for preset value bit masks Greg Kroah-Hartman
2022-12-05 19:10 ` [PATCH 4.19 105/105] mmc: sdhci: Fix voltage switch delay Greg Kroah-Hartman
2022-12-06 2:50 ` [PATCH 4.19 000/105] 4.19.268-rc1 review Shuah Khan
2022-12-06 10:25 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221205190803.994270275@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=patches@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).