LKML Archive on 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+7d26fc1eea198488deab@syzkaller.appspotmail.com,
	Alexander Potapenko <glider@google.com>,
	Douglas Gilbert <dgilbert@interlog.com>,
	Johannes Thumshirn <jthumshirn@suse.de>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: [PATCH 4.4 85/92] scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
Date: Thu, 24 May 2018 11:39:02 +0200	[thread overview]
Message-ID: <20180524093207.405689033@linuxfoundation.org> (raw)
In-Reply-To: <20180524093159.286472249@linuxfoundation.org>

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

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

From: Alexander Potapenko <glider@google.com>

commit a45b599ad808c3c982fdcdc12b0b8611c2f92824 upstream.

This shall help avoid copying uninitialized memory to the userspace when
calling ioctl(fd, SG_IO) with an empty command.

Reported-by: syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/sg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1903,7 +1903,7 @@ retry:
 		num = (rem_sz > scatter_elem_sz_prev) ?
 			scatter_elem_sz_prev : rem_sz;
 
-		schp->pages[k] = alloc_pages(gfp_mask, order);
+		schp->pages[k] = alloc_pages(gfp_mask | __GFP_ZERO, order);
 		if (!schp->pages[k])
 			goto out;
 

  parent reply	other threads:[~2018-05-24  9:46 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24  9:37 [PATCH 4.4 00/92] 4.4.133-stable review Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 01/92] 8139too: Use disable_irq_nosync() in rtl8139_poll_controller() Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 02/92] bridge: check iface upper dev when setting master via ioctl Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 03/92] dccp: fix tasklet usage Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 04/92] ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 05/92] llc: better deal with too small mtu Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 06/92] net: ethernet: sun: niu set correct packet size in skb Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 07/92] net/mlx4_en: Verify coalescing parameters are in range Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 08/92] net_sched: fq: take care of throttled flows before reuse Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 09/92] net: support compat 64-bit time in {s,g}etsockopt Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 10/92] openvswitch: Dont swap table in nlattr_set() after OVS_ATTR_NESTED is found Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 11/92] qmi_wwan: do not steal interfaces from class drivers Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 12/92] r8169: fix powering up RTL8168h Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 13/92] sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 14/92] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 15/92] tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent() Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 16/92] bonding: do not allow rlb updates to invalid mac Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 17/92] tcp: ignore Fast Open on repair mode Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 18/92] sctp: fix the issue that the cookie-ack with auth cant get processed Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 19/92] sctp: delay the authentication for the duplicated cookie-echo chunk Greg Kroah-Hartman
2018-06-06 22:31   ` Ben Hutchings
2018-06-07 18:21     ` Marcelo Ricardo Leitner
2018-05-24  9:37 ` [PATCH 4.4 20/92] ALSA: timer: Call notifier in the same spinlock Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 21/92] audit: move calcs after alloc and check when logging set loginuid Greg Kroah-Hartman
2018-05-24  9:37 ` [PATCH 4.4 22/92] arm64: introduce mov_q macro to move a constant into a 64-bit register Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 23/92] arm64: Add work around for Arm Cortex-A55 Erratum 1024718 Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 24/92] futex: Remove unnecessary warning from get_futex_key Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 25/92] futex: Remove duplicated code and fix undefined behaviour Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 26/92] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 27/92] lockd: lost rollback of set_grace_period() in lockd_down_net() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 28/92] Revert "ARM: dts: imx6qdl-wandboard: Fix audio channel swap" Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 29/92] l2tp: revert "l2tp: fix missing print session offset info" Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 30/92] pipe: cap initial pipe capacity according to pipe-max-size limit Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 31/92] futex: futex_wake_op, fix sign_extend32 sign bits Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 32/92] kernel/exit.c: avoid undefined behaviour when calling wait4() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 33/92] usbip: usbip_host: refine probe and disconnect debug msgs to be useful Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 34/92] usbip: usbip_host: delete device from busid_table after rebind Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 35/92] usbip: usbip_host: run rebind from exit when module is removed Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 36/92] usbip: usbip_host: fix NULL-ptr deref and use-after-free errors Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 37/92] usbip: usbip_host: fix bad unlock balance during stub_probe() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 38/92] ALSA: usb: mixer: volume quirk for CM102-A+/102S+ Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 39/92] ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 40/92] ALSA: control: fix a redundant-copy issue Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 41/92] spi: pxa2xx: Allow 64-bit DMA Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 42/92] powerpc/powernv: panic() on OPAL < V3 Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 43/92] powerpc/powernv: Remove OPALv2 firmware define and references Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 44/92] powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 45/92] cpuidle: coupled: remove unused define cpuidle_coupled_lock Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 46/92] powerpc: Dont preempt_disable() in show_cpuinfo() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 47/92] vmscan: do not force-scan file lru if its absolute size is small Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 48/92] proc: meminfo: estimate available memory more conservatively Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 49/92] mm: filemap: remove redundant code in do_read_cache_page Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 50/92] mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read Greg Kroah-Hartman
2018-05-24 10:50   ` Jan Kara
2018-05-24 11:05     ` Greg Kroah-Hartman
2018-05-24 11:17       ` Hugh Dickins
2018-05-24 11:28         ` Greg KH
2018-05-24 12:02           ` Jan Kara
2018-05-24 13:12             ` Mel Gorman
2018-05-24 17:27           ` Hugh Dickins
2018-05-24 19:06             ` Greg KH
2018-05-24 20:01               ` Hugh Dickins
2018-11-01 21:45               ` Pavel Machek
2018-05-24  9:38 ` [PATCH 4.4 51/92] signals: avoid unnecessary taking of sighand->siglock Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 52/92] cpufreq: intel_pstate: Enable HWP by default Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 53/92] tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all} Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 54/92] proc read mms {arg,env}_{start,end} with mmap semaphore taken Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 55/92] procfs: fix pthread cross-thread naming if !PR_DUMPABLE Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 56/92] powerpc/powernv: Fix NVRAM sleep in invalid context when crashing Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 57/92] mm: dont allow deferred pages with NEED_PER_CPU_KM Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 58/92] s390/qdio: fix access to uninitialized qdio_q fields Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 59/92] s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 60/92] s390/qdio: dont release memory in qdio_setup_irq() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 61/92] s390: remove indirect branch from do_softirq_own_stack Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 62/92] efi: Avoid potential crashes, fix the struct efi_pci_io_protocol_32 definition for mixed mode Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 63/92] ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 64/92] tick/broadcast: Use for_each_cpu() specially on UP kernels Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 65/92] ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 66/92] ARM: 8770/1: kprobes: Prohibit probing on optimized_callback Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 67/92] ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 68/92] Btrfs: fix xattr loss after power failure Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 69/92] btrfs: fix crash when trying to resume balance without the resume flag Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 70/92] btrfs: fix reading stale metadata blocks after degraded raid1 mounts Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 71/92] net: test tailroom before appending to linear skb Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 72/92] packet: in packet_snd start writing at link layer allocation Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 73/92] sock_diag: fix use-after-free read in __sk_free Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 74/92] tcp: purge write queue in tcp_connect_init() Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 75/92] ext2: fix a block leak Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 76/92] s390: add assembler macros for CPU alternatives Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 77/92] s390: move expoline assembler macros to a header Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 78/92] s390/lib: use expoline for indirect branches Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 79/92] s390/ftrace: " Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 80/92] s390/kernel: " Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 81/92] s390: move spectre sysfs attribute code Greg Kroah-Hartman
2018-05-24  9:38 ` [PATCH 4.4 82/92] s390: extend expoline to BC instructions Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 83/92] s390: use expoline thunks in the BPF JIT Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 84/92] scsi: libsas: defer ata device eh commands to libata Greg Kroah-Hartman
2018-05-24  9:39 ` Greg Kroah-Hartman [this message]
2018-05-24  9:39 ` [PATCH 4.4 86/92] scsi: zfcp: fix infinite iteration on ERP ready list Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 87/92] dmaengine: ensure dmaengine helpers check valid callback Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 88/92] time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 89/92] gpio: rcar: Add Runtime PM handling for interrupts Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 90/92] cfg80211: limit wiphy names to 128 bytes Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 91/92] hfsplus: stop workqueue when fill_super() failed Greg Kroah-Hartman
2018-05-24  9:39 ` [PATCH 4.4 92/92] x86/kexec: Avoid double free_page() upon do_kexec_load() failure Greg Kroah-Hartman
2018-05-24 13:22 ` [PATCH 4.4 00/92] 4.4.133-stable review Guenter Roeck
2018-05-24 14:45 ` Nathan Chancellor
2018-05-24 16:46 ` kernelci.org bot
2018-05-24 17:32 ` Guenter Roeck
2018-05-24 19:47   ` Greg Kroah-Hartman
2018-05-25 14:11     ` Greg Kroah-Hartman
2018-05-25 16:39       ` Guenter Roeck
2018-05-25 16:50         ` Greg Kroah-Hartman
2018-05-24 18:06 ` Dan Rue
2018-05-24 18:17   ` Guenter Roeck
2018-05-24 21:34     ` Naresh Kamboju
2018-05-24 21:52       ` Shuah Khan
2018-05-25  0:11         ` Dan Rue
2018-05-24 19:08   ` Greg Kroah-Hartman
2018-05-24 20:31     ` Rafael Tinoco
2018-05-25  1:34       ` Daniel Sangorrin
2018-05-25  2:51         ` Rafael Tinoco
2018-05-25  6:11           ` Daniel Sangorrin
2018-05-25  7:58         ` Naresh Kamboju
2018-05-25  0:46     ` Dan Rue
2018-05-24 19:28 ` Shuah Khan

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=20180524093207.405689033@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dgilbert@interlog.com \
    --cc=glider@google.com \
    --cc=jthumshirn@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com \
    --subject='Re: [PATCH 4.4 85/92] scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()' \
    /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

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).