From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
syzbot <syzkaller@googlegroups.com>,
Karsten Keil <isdn@linux-pingi.de>,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 4.14 011/101] isdn: fix kernel-infoleak in capi_unlocked_ioctl
Date: Mon, 7 Jan 2019 13:31:59 +0100 [thread overview]
Message-ID: <20190107105331.483283500@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: Eric Dumazet <edumazet@google.com>
[ Upstream commit d63967e475ae10f286dbd35e189cb241e0b1f284 ]
Since capi_ioctl() copies 64 bytes after calling
capi20_get_manufacturer() we need to ensure to not leak
information to user.
BUG: KMSAN: kernel-infoleak in _copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
CPU: 0 PID: 11245 Comm: syz-executor633 Not tainted 4.20.0-rc7+ #2
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+0x173/0x1d0 lib/dump_stack.c:113
kmsan_report+0x12e/0x2a0 mm/kmsan/kmsan.c:613
kmsan_internal_check_memory+0x9d4/0xb00 mm/kmsan/kmsan.c:704
kmsan_copy_to_user+0xab/0xc0 mm/kmsan/kmsan_hooks.c:601
_copy_to_user+0x16b/0x1f0 lib/usercopy.c:32
capi_ioctl include/linux/uaccess.h:177 [inline]
capi_unlocked_ioctl+0x1a0b/0x1bf0 drivers/isdn/capi/capi.c:939
do_vfs_ioctl+0xebd/0x2bf0 fs/ioctl.c:46
ksys_ioctl fs/ioctl.c:713 [inline]
__do_sys_ioctl fs/ioctl.c:720 [inline]
__se_sys_ioctl+0x1da/0x270 fs/ioctl.c:718
__x64_sys_ioctl+0x4a/0x70 fs/ioctl.c:718
do_syscall_64+0xbc/0xf0 arch/x86/entry/common.c:291
entry_SYSCALL_64_after_hwframe+0x63/0xe7
RIP: 0033:0x440019
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 fb 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffdd4659fb8 EFLAGS: 00000213 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440019
RDX: 0000000020000080 RSI: 00000000c0044306 RDI: 0000000000000003
RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000213 R12: 00000000004018a0
R13: 0000000000401930 R14: 0000000000000000 R15: 0000000000000000
Local variable description: ----data.i@capi_unlocked_ioctl
Variable was created at:
capi_ioctl drivers/isdn/capi/capi.c:747 [inline]
capi_unlocked_ioctl+0x82/0x1bf0 drivers/isdn/capi/capi.c:939
do_vfs_ioctl+0xebd/0x2bf0 fs/ioctl.c:46
Bytes 12-63 of 64 are uninitialized
Memory access of size 64 starts at ffff88807ac5fce8
Data copied to user address 0000000020000080
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/isdn/capi/kcapi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/isdn/capi/kcapi.c
+++ b/drivers/isdn/capi/kcapi.c
@@ -851,7 +851,7 @@ u16 capi20_get_manufacturer(u32 contr, u
u16 ret;
if (contr == 0) {
- strlcpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
+ strncpy(buf, capi_manufakturer, CAPI_MANUFACTURER_LEN);
return CAPI_NOERROR;
}
@@ -859,7 +859,7 @@ u16 capi20_get_manufacturer(u32 contr, u
ctr = get_capi_ctr_by_nr(contr);
if (ctr && ctr->state == CAPI_CTR_RUNNING) {
- strlcpy(buf, ctr->manu, CAPI_MANUFACTURER_LEN);
+ strncpy(buf, ctr->manu, CAPI_MANUFACTURER_LEN);
ret = CAPI_NOERROR;
} else
ret = CAPI_REGNOTINSTALLED;
next prev parent reply other threads:[~2019-01-07 12:59 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 ` Greg Kroah-Hartman [this message]
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 ` [PATCH 4.14 021/101] sctp: initialize sin6_flowinfo for ipv6 addrs in sctp_inet6addr_event Greg Kroah-Hartman
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=20190107105331.483283500@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=isdn@linux-pingi.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzkaller@googlegroups.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.