All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	syzbot+ad5d327e6936a2e284be@syzkaller.appspotmail.com,
	Xin Long <lucien.xin@gmail.com>,
	Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.14 021/101] sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event
Date: Mon,  7 Jan 2019 13:32:09 +0100	[thread overview]
Message-ID: <20190107105334.111598005@linuxfoundation.org> (raw)
In-Reply-To: <20190107105330.372621917@linuxfoundation.org>

4.14-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Xin Long <lucien.xin@gmail.com>

[ Upstream commit 4a2eb0c37b4759416996fbb4c45b932500cf06d3 ]

syzbot reported a kernel-infoleak, which is caused by an uninitialized
field(sin6_flowinfo) of addr->a.v6 in sctp_inet6addr_event().
The call trace is as below:

  BUG: KMSAN: kernel-infoleak in _copy_to_user+0x19a/0x230 lib/usercopy.c:33
  CPU: 1 PID: 8164 Comm: syz-executor2 Not tainted 4.20.0-rc3+ #95
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
  Google 01/01/2011
  Call Trace:
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x32d/0x480 lib/dump_stack.c:113
    kmsan_report+0x12c/0x290 mm/kmsan/kmsan.c:683
    kmsan_internal_check_memory+0x32a/0xa50 mm/kmsan/kmsan.c:743
    kmsan_copy_to_user+0x78/0xd0 mm/kmsan/kmsan_hooks.c:634
    _copy_to_user+0x19a/0x230 lib/usercopy.c:33
    copy_to_user include/linux/uaccess.h:183 [inline]
    sctp_getsockopt_local_addrs net/sctp/socket.c:5998 [inline]
    sctp_getsockopt+0x15248/0x186f0 net/sctp/socket.c:7477
    sock_common_getsockopt+0x13f/0x180 net/core/sock.c:2937
    __sys_getsockopt+0x489/0x550 net/socket.c:1939
    __do_sys_getsockopt net/socket.c:1950 [inline]
    __se_sys_getsockopt+0xe1/0x100 net/socket.c:1947
    __x64_sys_getsockopt+0x62/0x80 net/socket.c:1947
    do_syscall_64+0xcf/0x110 arch/x86/entry/common.c:291
    entry_SYSCALL_64_after_hwframe+0x63/0xe7

sin6_flowinfo is not really used by SCTP, so it will be fixed by simply
setting it to 0.

The issue exists since very beginning.
Thanks Alexander for the reproducer provided.

Reported-by: syzbot+ad5d327e6936a2e284be@syzkaller.appspotmail.com
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/sctp/ipv6.c |    1 +
 1 file changed, 1 insertion(+)

--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -101,6 +101,7 @@ static int sctp_inet6addr_event(struct n
 		if (addr) {
 			addr->a.v6.sin6_family = AF_INET6;
 			addr->a.v6.sin6_port = 0;
+			addr->a.v6.sin6_flowinfo = 0;
 			addr->a.v6.sin6_addr = ifa->addr;
 			addr->a.v6.sin6_scope_id = ifa->idev->dev->ifindex;
 			addr->valid = 1;



  parent reply	other threads:[~2019-01-07 13:00 UTC|newest]

Thread overview: 131+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 12:31 [PATCH 4.14 000/101] 4.14.92-stable review Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 001/101] phonet: af_phonet: Fix Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 21:11   ` Sudip Mukherjee
2019-01-08  0:36     ` David Miller
2019-01-08  7:44       ` Greg KH
2019-01-07 12:31 ` [PATCH 4.14 002/101] net: core: " Greg Kroah-Hartman
2019-01-07 21:13   ` Sudip Mukherjee
2019-01-08  0:36     ` David Miller
2019-01-08  7:44       ` Greg KH
2019-01-07 12:31 ` [PATCH 4.14 003/101] ipv4: Fix potential " Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 004/101] ip6mr: " Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 005/101] ax25: fix a use-after-free in ax25_fillin_cb() Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 006/101] gro_cell: add napi_disable in gro_cells_destroy Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 007/101] ibmveth: fix DMA unmap error in ibmveth_xmit_start error path Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 008/101] ieee802154: lowpan_header_create check must check daddr Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 009/101] ipv6: explicitly initialize udp6_addr in udp_sock_create6() Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 010/101] ipv6: tunnels: fix two use-after-free Greg Kroah-Hartman
2019-01-07 12:31 ` [PATCH 4.14 011/101] isdn: fix kernel-infoleak in capi_unlocked_ioctl Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 012/101] net: ipv4: do not handle duplicate fragments as overlapping Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 013/101] net: macb: restart tx after tx used bit read Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 014/101] net: phy: Fix the issue that netif always links up after resuming Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 015/101] netrom: fix locking in nr_find_socket() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 016/101] net/wan: fix a double free in x25_asy_open_tty() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 017/101] packet: validate address length Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 018/101] packet: validate address length if non-zero Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 019/101] ptr_ring: wrap back ->producer in __ptr_ring_swap_queue() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 020/101] qmi_wwan: Added support for Telit LN940 series Greg Kroah-Hartman
2019-01-07 12:32 ` Greg Kroah-Hartman [this message]
2019-01-07 12:32 ` [PATCH 4.14 022/101] tcp: fix a race in inet_diag_dump_icsk() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 023/101] tipc: fix a double kfree_skb() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 024/101] vhost: make sure used idx is seen before log in vhost_add_used_n() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 025/101] VSOCK: Send reset control packet when socket is partially bound Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 026/101] xen/netfront: tolerate frags with no data Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 027/101] net/mlx5: Typo fix in del_sw_hw_rule Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 028/101] net/mlx5e: RX, Fix wrong early return in receive queue poll Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 029/101] mlxsw: core: Increase timeout during firmware flash process Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 030/101] net/mlx5e: Remove the false indication of software timestamping support Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 031/101] tipc: use lock_sock() in tipc_sk_reinit() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 032/101] tipc: compare remote and local protocols in tipc_udp_enable() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 033/101] qmi_wwan: Added support for Fibocom NL668 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 034/101] qmi_wwan: Add support for Fibocom NL678 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 035/101] net/smc: fix TCP fallback socket release Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 036/101] sock: Make sock->sk_stamp thread-safe Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 037/101] IB/hfi1: Incorrect sizing of sge for PIO will OOPs Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 038/101] ALSA: rme9652: Fix potential Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 039/101] ALSA: emu10k1: Fix potential Spectre v1 vulnerabilities Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 040/101] ALSA: pcm: Fix potential Spectre v1 vulnerability Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 041/101] ALSA: emux: Fix potential Spectre v1 vulnerabilities Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 042/101] mtd: atmel-quadspi: disallow building on ebsa110 Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 043/101] ALSA: hda: add mute LED support for HP EliteBook 840 G4 Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 044/101] ALSA: fireface: fix for state to fetch PCM frames Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 045/101] ALSA: firewire-lib: fix wrong handling payload_length as payload_quadlet Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 046/101] ALSA: firewire-lib: fix wrong assignment for out_packet_without_header tracepoint Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 047/101] ALSA: firewire-lib: use the same print format for without_header tracepoints Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 048/101] ALSA: hda/tegra: clear pending irq handlers Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 049/101] USB: serial: pl2303: add ids for Hewlett-Packard HP POS pole displays Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 050/101] USB: serial: option: add Fibocom NL678 series Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 051/101] usb: r8a66597: Fix a possible concurrency use-after-free bug in r8a66597_endpoint_disable() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 052/101] staging: wilc1000: fix missing read_write setting when reading data Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 053/101] qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 054/101] s390/pci: fix sleeping in atomic during hotplug Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 055/101] Input: elan_i2c - add ACPI ID for touchpad in ASUS Aspire F5-573G Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 056/101] x86/speculation/l1tf: Drop the swap storage limit restriction when l1tf=off Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 057/101] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 058/101] KVM: x86: Use jmp to invoke kvm_spurious_fault() from .fixup Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 059/101] KVM: nVMX: Free the VMREAD/VMWRITE bitmaps if alloc_kvm_area() fails Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 060/101] platform-msi: Free descriptors in platform_msi_domain_free() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 061/101] perf pmu: Suppress potential format-truncation warning Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 062/101] ext4: add ext4_sb_bread() to disambiguate ENOMEM cases Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 063/101] ext4: fix possible use after free in ext4_quota_enable Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 064/101] ext4: missing unlock/put_page() in ext4_try_to_write_inline_data() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 065/101] ext4: fix EXT4_IOC_GROUP_ADD ioctl Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 066/101] ext4: include terminating u32 in size of xattr entries when expanding inodes Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 067/101] ext4: force inode writes when nfsd calls commit_metadata() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 068/101] ext4: check for shutdown and r/o file system in ext4_write_inode() Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 069/101] spi: bcm2835: Fix race on DMA termination Greg Kroah-Hartman
2019-01-07 21:15   ` Sudip Mukherjee
2019-01-08  7:37     ` Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 070/101] spi: bcm2835: Fix book-keeping of " Greg Kroah-Hartman
2019-01-07 12:32 ` [PATCH 4.14 071/101] spi: bcm2835: Avoid finishing transfer prematurely in IRQ mode Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 072/101] clk: rockchip: fix typo in rk3188 spdif_frac parent Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 073/101] crypto: cavium/nitrox - fix a DMA pool free failure Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 074/101] crypto: testmgr - add AES-CFB tests Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 075/101] cgroup: fix CSS_TASK_ITER_PROCS Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 076/101] cdc-acm: fix abnormal DATA RX issue for Mediatek Preloader Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 077/101] Btrfs: fix fsync of files with multiple hard links in new directories Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 078/101] btrfs: run delayed items before dropping the snapshot Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 079/101] powerpc/tm: Set MSR[TS] just prior to recheckpoint Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 080/101] netfilter: xt_connlimit: dont store address in the conn nodes Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 081/101] netfilter: nf_conncount: expose connection list interface Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 082/101] netfilter: nf_conncount: Fix garbage collection with zones Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 083/101] netfilter: nf_conncount: fix garbage collection confirm race Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 084/101] netfilter: nf_conncount: dont skip eviction when age is negative Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 085/101] f2fs: fix validation of the block count in sanity_check_raw_super Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 086/101] serial: uartps: Fix interrupt mask issue to handle the RX interrupts properly Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 087/101] media: vivid: free bitmap_cap when updating std/timings/etc Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 088/101] media: v4l2-tpg: array index could become negative Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 089/101] MIPS: math-emu: Write-protect delay slot emulation pages Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 090/101] MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3 Greg Kroah-Hartman
2019-01-07 21:17   ` Sudip Mukherjee
2019-01-08  7:38     ` Greg Kroah-Hartman
2019-01-08  9:54       ` Sudip Mukherjee
2019-01-08 12:03         ` Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 091/101] MIPS: Ensure pmd_present() returns false after pmd_mknotpresent() Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 092/101] MIPS: Align kernel load address to 64KB Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 093/101] MIPS: Expand MIPS32 ASIDs to 64 bits Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 094/101] MIPS: OCTEON: mark RGMII interface disabled on OCTEON III Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 095/101] CIFS: Fix error mapping for SMB2_LOCK command which caused OFD lock problem Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 096/101] arm64: KVM: Avoid setting the upper 32 bits of VTCR_EL2 to 1 Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 097/101] arm/arm64: KVM: vgic: Force VM halt when changing the active state of GICv3 PPIs/SGIs Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 098/101] rtc: m41t80: Correct alarm month range with RTC reads Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 099/101] tpm: tpm_try_transmit() refactor error flow Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 100/101] tpm: tpm_i2c_nuvoton: use correct command duration for TPM 2.x Greg Kroah-Hartman
2019-01-07 12:33 ` [PATCH 4.14 101/101] ARM: dts: exynos: Specify I2S assigned clocks in proper node Greg Kroah-Hartman
2019-01-07 14:39 ` [PATCH 4.14 000/101] 4.14.92-stable review Daniel Díaz
2019-01-07 14:47   ` Greg Kroah-Hartman
2019-01-07 14:51     ` Greg Kroah-Hartman
2019-01-07 14:52 ` Greg Kroah-Hartman
2019-01-08  9:20   ` Naresh Kamboju
2019-01-07 22:34 ` shuah
2019-01-07 22:38   ` shuah
2019-01-08  4:59 ` Guenter Roeck
2019-01-08 12:25   ` Greg Kroah-Hartman
2019-01-09 11:40     ` Jinpu Wang
2019-01-09 14:46       ` Greg Kroah-Hartman
2019-01-09 15:47         ` Guenter Roeck
2019-01-08 12:19 ` Greg Kroah-Hartman
2019-01-09 10:47   ` Jon Hunter
2019-01-09 10:47     ` Jon Hunter
2019-01-09 14:40     ` Greg Kroah-Hartman
2019-01-08 23:05 ` Guenter Roeck

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=20190107105334.111598005@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=nhorman@tuxdriver.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+ad5d327e6936a2e284be@syzkaller.appspotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.