[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-stable-commits
Subject:    Patch "lz4: fix another possible overrun" has been added to the 3.14-stable tree
From:       <gregkh () linuxfoundation ! org>
Date:       2014-06-28 15:37:49
Message-ID: 14039698693034 () kroah ! com
[Download RAW message or body]


This is a note to let you know that I've just added the patch titled

    lz4: fix another possible overrun

to the 3.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     lz4-fix-another-possible-overrun.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


From 4148c1f67abf823099b2d7db6851e4aea407f5ee Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 24 Jun 2014 16:59:01 -0400
Subject: lz4: fix another possible overrun

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

commit 4148c1f67abf823099b2d7db6851e4aea407f5ee upstream.

There is one other possible overrun in the lz4 code as implemented by
Linux at this point in time (which differs from the upstream lz4
codebase, but will get synced at in a future kernel release.)  As
pointed out by Don, we also need to check the overflow in the data
itself.

While we are at it, replace the odd error return value with just a
"simple" -1 value as the return value is never used for anything other
than a basic "did this work or not" check.

Reported-by: "Don A. Bailey" <donb@securitymouse.com>
Reported-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 lib/lz4/lz4_decompress.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -108,6 +108,8 @@ static int lz4_uncompress(const char *so
 		if (length == ML_MASK) {
 			for (; *ip == 255; length += 255)
 				ip++;
+			if (unlikely(length > (size_t)(length + *ip)))
+				goto _output_error;
 			length += *ip++;
 		}
 
@@ -157,7 +159,7 @@ static int lz4_uncompress(const char *so
 
 	/* write overflow error detected */
 _output_error:
-	return (int) (-(((char *)ip) - source));
+	return -1;
 }
 
 static int lz4_uncompress_unknownoutputsize(const char *source, char *dest,


Patches currently in stable-queue which might be from gregkh@linuxfoundation.org are

queue-3.14/genirq-sanitize-spurious-interrupt-detection-of-threaded-irqs.patch
queue-3.14/bluetooth-fix-l2cap-deadlock.patch
queue-3.14/btrfs-send-don-t-error-in-the-presence-of-subvols-snapshots.patch
queue-3.14/usb-sierra-fix-remote-wakeup.patch
queue-3.14/acpica-utstring-check-array-index-bound-before-use.patch
queue-3.14/media-saa7134-fix-regression-with-tvtime.patch
queue-3.14/arm64-ptrace-change-fs-when-passing-kernel-pointer-to-regset-code.patch
queue-3.14/btrfs-fix-use-of-uninit-ret-in-end_extent_writepage.patch
queue-3.14/x86-32-espfix-remove-filter-for-espfix32-due-to-race.patch
queue-3.14/fs-btrfs-volumes.c-fix-for-possible-null-pointer-dereference.patch
queue-3.14/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch
queue-3.14/rtmutex-detect-changes-in-the-pi-lock-chain.patch
queue-3.14/phy-exynos-mipi-video-fix-check-on-array-index.patch
queue-3.14/mm-fix-sleeping-function-warning-from-__put_anon_vma.patch
queue-3.14/bluetooth-6lowpan-fix-mac-address-universal-local-bit-handling.patch
queue-3.14/pm-opp-fix-incorrect-opp-count-handling-in-of_init_opp_table.patch
queue-3.14/target-iscsi-fix-sendtargets-response-pdu-for-iser-transport.patch
queue-3.14/hugetlb-restrict-hugepage_migration_support-to-x86_64.patch
queue-3.14/aio-fix-aio-request-leak-when-events-are-reaped-by-userspace.patch
queue-3.14/arm-8037-1-mm-support-big-endian-page-tables.patch
queue-3.14/extcon-max14577-properly-handle-regmap_irq_get_virq-error.patch
queue-3.14/usb-usb_wwan-fix-potential-blocked-i-o-after-resume.patch
queue-3.14/usb-option-fix-runtime-pm-handling.patch
queue-3.14/revert-net-eth-cpsw-correctly-attach-to-gpio-bitbang-mdio.patch
queue-3.14/target-iser-improve-cm-events-handling.patch
queue-3.14/btrfs-fix-double-free-in-find_lock_delalloc_range.patch
queue-3.14/mm-vmscan-do-not-throttle-based-on-pfmemalloc-reserves-if-node-has-no-zone_normal.patch
queue-3.14/extcon-max8997-fix-null-pointer-exception-on-missing-pdata.patch
queue-3.14/scsi-fix-spurious-request-sense-in-error-handling.patch
queue-3.14/lz4-fix-another-possible-overrun.patch
queue-3.14/bluetooth-hci_ldisc-fix-deadlock-condition.patch
queue-3.14/media-uvcvideo-fix-clock-param-realtime-setting.patch
queue-3.14/iscsi-target-fix-abort_task-connection-reset-iscsi_queue_req-memory-leak.patch
queue-3.14/x86-x32-use-compat-shims-for-io_-setup-submit.patch
queue-3.14/target-report-correct-response-length-for-some-commands.patch
queue-3.14/btrfs-output-warning-instead-of-error-when-loading-free-space-cache-failed.patch
queue-3.14/usb-qcserial-add-netgear-aircard-341u.patch
queue-3.14/acpi-add-dynamic_debug-support.patch
queue-3.14/usb-sierra-fix-use-after-free-at-suspend-resume.patch
queue-3.14/rtmutex-plug-slow-unlock-race.patch
queue-3.14/ext4-fix-zeroing-of-page-during-writeback.patch
queue-3.14/arm64-ptrace-fix-empty-registers-set-in-prstatus-of-aarch32-process-core.patch
queue-3.14/mm-vmscan-clear-kswapd-s-special-reclaim-powers-before-exiting.patch
queue-3.14/target-iser-wait-for-proper-cleanup-before-unloading.patch
queue-3.14/ptrace-fix-fork-event-messages-across-pid-namespaces.patch
queue-3.14/s390-time-cast-tv_nsec-to-u64-prior-to-shift-in-update_vsyscall.patch
queue-3.14/usb-dwc3-gadget-clear-stall-when-disabling-endpoint.patch
queue-3.14/hid-core-fix-validation-of-report-id-0.patch
queue-3.14/mm-memory-failure.c-don-t-let-collect_procs-skip-over-processes-for-mf_action_required.patch
queue-3.14/staging-mt29f_spinand-terminate-of-match-table.patch
queue-3.14/usb-usbtest-add-a-timeout-for-scatter-gather-tests.patch
queue-3.14/usb-usb_wwan-fix-race-between-write-and-resume.patch
queue-3.14/staging-rtl8188eu-overflow-in-update_sta_support_rate.patch
queue-3.14/af_iucv-wrong-mapping-of-sent-and-confirmed-skbs.patch
queue-3.14/usb-sierra-fix-urb-and-memory-leak-in-resume-error-path.patch
queue-3.14/ext4-fix-wrong-assert-in-ext4_mb_normalize_request.patch
queue-3.14/usb-usb_wwan-fix-write-and-suspend-race.patch
queue-3.14/s390-lowcore-reserve-96-bytes-for-irb-in-lowcore.patch
queue-3.14/btrfs-use-right-type-to-get-real-comparison.patch
queue-3.14/target-iser-bail-from-accept_np-if-np_thread-is-trying-to-close.patch
queue-3.14/usb-usb_wwan-fix-urb-leak-in-write-error-path.patch
queue-3.14/target-set-cmd_t_active-bit-for-task-management-requests.patch
queue-3.14/rtmutex-handle-deadlock-detection-smarter.patch
queue-3.14/usb-gadget-rename-config_usb_gadget_pxa25x.patch
queue-3.14/arm-omap-replace-checks-for-config_usb_gadget_omap.patch
queue-3.14/extcon-max14577-fix-probe-failure-on-successful-work-queue.patch
queue-3.14/arm-stacktrace-avoid-listing-stacktrace-functions-in-stacktrace.patch
queue-3.14/arm-mvebu-dt-fix-openblocks-ax3-4-ram-size.patch
queue-3.14/btrfs-fix-scrub_print_warning-to-handle-skinny-metadata-extents.patch
queue-3.14/target-iser-fix-hangs-in-connection-teardown.patch
queue-3.14/mm-memory-failure.c-support-use-of-a-dedicated-thread-to-handle-sigbus-bus_mceerr_ao.patch
queue-3.14/kthread-fix-return-value-of-kthread_create-upon-sigkill.patch
queue-3.14/usb-sierra-fix-aa-deadlock-in-open-error-path.patch
queue-3.14/btrfs-make-sure-there-are-not-any-read-requests-before-stopping-workers.patch
queue-3.14/staging-tidspbridge-check-for-config_snd_omap_soc_mcbsp.patch
queue-3.14/btrfs-don-t-check-nodes-for-extent-items.patch
queue-3.14/usb-usbtest-fix-unlink-write-error-with-pattern-1.patch
queue-3.14/usb-usb_wwan-fix-potential-null-deref-at-resume.patch
queue-3.14/btrfs-fix-null-pointer-crash-of-deleting-a-seed-device.patch
queue-3.14/usb-sierra-fix-urb-and-memory-leak-on-disconnect.patch
queue-3.14/btrfs-allocate-raid-type-kobjects-dynamically.patch
queue-3.14/ext4-fix-data-integrity-sync-in-ordered-mode.patch
queue-3.14/idr-fix-overflow-bug-during-maximum-id-calculation-at-maximum-height.patch
queue-3.14/usb-ehci-avoid-bios-handover-on-the-hasee-e200.patch
queue-3.14/net-cpsw-fix-null-dereference-at-probe.patch
queue-3.14/applicom-dereferencing-null-on-error-path.patch
queue-3.14/cifs-fix-memory-leaks-in-smb2_open.patch
queue-3.14/media-radio-bcm2048-fix-wrong-overflow-check.patch
queue-3.14/media-ivtv-fix-oops-when-no-firmware-is-loaded.patch
queue-3.14/mm-page_alloc-use-word-based-accesses-for-get-set-pageblock-bitmaps.patch
queue-3.14/usb-qcserial-add-additional-sierra-wireless-qmi-devices.patch
queue-3.14/target-use-complete_all-for-se_cmd-t_transport_stop_comp.patch
queue-3.14/matroxfb-perform-a-dummy-read-of-m_status.patch
queue-3.14/btrfs-set-right-total-device-count-for-seeding-support.patch
queue-3.14/usb-usb_wwan-fix-urb-leak-at-shutdown.patch
queue-3.14/can-peak_pci-prevent-use-after-free-at-netdev-removal.patch
queue-3.14/btrfs-mark-mapping-with-error-flag-to-report-errors-to-userspace.patch
queue-3.14/extcon-max77693-fix-two-null-pointer-exceptions-on-missing-pdata.patch
queue-3.14/btrfs-add-ctime-mtime-update-for-btrfs-device-add-remove.patch
queue-3.14/arm64-dma-removing-arch_has_dma_get_required_mask-macro.patch
queue-3.14/mm-memory-failure.c-failure-send-right-signal-code-to-correct-thread.patch
queue-3.14/btrfs-fix-lockdep-warning-with-reclaim-lock-inversion.patch
queue-3.14/usb-serial-fix-potential-runtime-pm-imbalance-at-device-remove.patch
queue-3.14/aio-fix-kernel-memory-disclosure-in-io_getevents-introduced-in-v3.10.patch
queue-3.14/target-explicitly-clear-ramdisk_mcp-backend-pages.patch
queue-3.14/media-stk1160-avoid-stack-allocated-buffer-for-control-urbs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable-commits" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic