Patch "lz4: fix another possible overrun" has been added to the 3.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    lz4: fix another possible overrun

to the 3.15-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.15 subdirectory.

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


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

From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxx>
Reported-by: Willy Tarreau <w@xxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
 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@xxxxxxxxxxxxxxxxxxx are

queue-3.15/genirq-sanitize-spurious-interrupt-detection-of-threaded-irqs.patch
queue-3.15/bluetooth-fix-l2cap-deadlock.patch
queue-3.15/btrfs-send-don-t-error-in-the-presence-of-subvols-snapshots.patch
queue-3.15/usb-sierra-fix-remote-wakeup.patch
queue-3.15/acpica-utstring-check-array-index-bound-before-use.patch
queue-3.15/media-saa7134-fix-regression-with-tvtime.patch
queue-3.15/arm64-ptrace-change-fs-when-passing-kernel-pointer-to-regset-code.patch
queue-3.15/btrfs-fix-use-of-uninit-ret-in-end_extent_writepage.patch
queue-3.15/x86-32-espfix-remove-filter-for-espfix32-due-to-race.patch
queue-3.15/revert-offb-add-palette-hack-for-little-endian.patch
queue-3.15/fs-btrfs-volumes.c-fix-for-possible-null-pointer-dereference.patch
queue-3.15/acpi-fix-conflict-between-customized-dsdt-and-dsdt-local-copy.patch
queue-3.15/rtmutex-detect-changes-in-the-pi-lock-chain.patch
queue-3.15/phy-exynos-mipi-video-fix-check-on-array-index.patch
queue-3.15/mm-fix-sleeping-function-warning-from-__put_anon_vma.patch
queue-3.15/regulator-s2mpa01-fix-accidental-enable-of-buck4-ramp-delay.patch
queue-3.15/target-sbc-loopback-adjust-command-data-length-in-case-pi-exists-on-the-wire.patch
queue-3.15/bluetooth-6lowpan-fix-mac-address-universal-local-bit-handling.patch
queue-3.15/pm-opp-fix-incorrect-opp-count-handling-in-of_init_opp_table.patch
queue-3.15/target-iscsi-fix-sendtargets-response-pdu-for-iser-transport.patch
queue-3.15/hugetlb-restrict-hugepage_migration_support-to-x86_64.patch
queue-3.15/aio-fix-aio-request-leak-when-events-are-reaped-by-userspace.patch
queue-3.15/arm-omap2-gpmc-enable-bch_hw-ecc-scheme-for-am43xx-platforms.patch
queue-3.15/arm-8037-1-mm-support-big-endian-page-tables.patch
queue-3.15/extcon-max14577-properly-handle-regmap_irq_get_virq-error.patch
queue-3.15/usb-usb_wwan-fix-potential-blocked-i-o-after-resume.patch
queue-3.15/usb-option-fix-runtime-pm-handling.patch
queue-3.15/block-virtio_blk-don-t-hold-spin-lock-during-world-switch.patch
queue-3.15/target-iser-improve-cm-events-handling.patch
queue-3.15/tools-vm-page-types.c-catch-sigbus-if-raced-with-truncate.patch
queue-3.15/bluetooth-clearly-distinguish-mgmt-ltk-type-from-authenticated-property.patch
queue-3.15/f2fs-submit-bio-at-the-reclaim-path.patch
queue-3.15/arm64-mm-remove-broken-operator-from-pmd_mknotpresent.patch
queue-3.15/btrfs-fix-double-free-in-find_lock_delalloc_range.patch
queue-3.15/mm-vmscan-do-not-throttle-based-on-pfmemalloc-reserves-if-node-has-no-zone_normal.patch
queue-3.15/extcon-max8997-fix-null-pointer-exception-on-missing-pdata.patch
queue-3.15/memcg-do-not-hang-on-oom-when-killed-by-userspace-oom-access-to-memory-reserves.patch
queue-3.15/bluetooth-fix-properly-ignoring-ltks-of-unknown-types.patch
queue-3.15/lz4-fix-another-possible-overrun.patch
queue-3.15/bluetooth-hci_ldisc-fix-deadlock-condition.patch
queue-3.15/zram-correct-offset-usage-in-zram_bio_discard.patch
queue-3.15/media-uvcvideo-fix-clock-param-realtime-setting.patch
queue-3.15/iscsi-target-fix-abort_task-connection-reset-iscsi_queue_req-memory-leak.patch
queue-3.15/btrfs-fix-leaf-corruption-caused-by-enospc-while-hole-punching.patch
queue-3.15/regulator-s2mps11-fix-accidental-enable-of-buck6-ramp-delay.patch
queue-3.15/w1-do-not-unlock-unheld-list_mutex-in-__w1_remove_master_device.patch
queue-3.15/x86-x32-use-compat-shims-for-io_-setup-submit.patch
queue-3.15/target-report-correct-response-length-for-some-commands.patch
queue-3.15/btrfs-output-warning-instead-of-error-when-loading-free-space-cache-failed.patch
queue-3.15/bluetooth-fix-missing-check-for-fips-security-level.patch
queue-3.15/usb-qcserial-add-netgear-aircard-341u.patch
queue-3.15/ext4-fix-zero_range-test-failure-in-data-journalling.patch
queue-3.15/acpi-add-dynamic_debug-support.patch
queue-3.15/usb-sierra-fix-use-after-free-at-suspend-resume.patch
queue-3.15/target-iser-gracefully-reject-t10-pi-enabled-connect-request-if-not-supported.patch
queue-3.15/btrfs-send-account-for-orphan-directories-when-building-path-strings.patch
queue-3.15/rtmutex-plug-slow-unlock-race.patch
queue-3.15/ext4-fix-zeroing-of-page-during-writeback.patch
queue-3.15/arm64-ptrace-fix-empty-registers-set-in-prstatus-of-aarch32-process-core.patch
queue-3.15/mm-vmscan-clear-kswapd-s-special-reclaim-powers-before-exiting.patch
queue-3.15/target-iser-wait-for-proper-cleanup-before-unloading.patch
queue-3.15/ptrace-fix-fork-event-messages-across-pid-namespaces.patch
queue-3.15/s390-time-cast-tv_nsec-to-u64-prior-to-shift-in-update_vsyscall.patch
queue-3.15/usb-dwc3-gadget-clear-stall-when-disabling-endpoint.patch
queue-3.15/hid-core-fix-validation-of-report-id-0.patch
queue-3.15/target-iser-fix-a-wrong-dereference-in-case-discovery-session-is-over-iser.patch
queue-3.15/bluetooth-fix-authentication-check-for-fips-security-level.patch
queue-3.15/mm-memory-failure.c-don-t-let-collect_procs-skip-over-processes-for-mf_action_required.patch
queue-3.15/staging-mt29f_spinand-terminate-of-match-table.patch
queue-3.15/usb-usbtest-add-a-timeout-for-scatter-gather-tests.patch
queue-3.15/usb-usb_wwan-fix-race-between-write-and-resume.patch
queue-3.15/staging-rtl8188eu-overflow-in-update_sta_support_rate.patch
queue-3.15/acpi-ia64-sba_iommu-restore-the-working-initialization-ordering.patch
queue-3.15/usb-sierra-fix-urb-and-memory-leak-in-resume-error-path.patch
queue-3.15/ext4-fix-wrong-assert-in-ext4_mb_normalize_request.patch
queue-3.15/usb-usb_wwan-fix-write-and-suspend-race.patch
queue-3.15/btrfs-read-inode-size-after-acquiring-the-mutex-when-punching-a-hole.patch
queue-3.15/s390-lowcore-reserve-96-bytes-for-irb-in-lowcore.patch
queue-3.15/btrfs-use-right-type-to-get-real-comparison.patch
queue-3.15/target-iser-bail-from-accept_np-if-np_thread-is-trying-to-close.patch
queue-3.15/revert-drm-radeon-use-variable-uvd-clocks.patch
queue-3.15/bluetooth-fix-requiring-smp-mitm-for-outgoing-connections.patch
queue-3.15/usb-usb_wwan-fix-urb-leak-in-write-error-path.patch
queue-3.15/target-set-cmd_t_active-bit-for-task-management-requests.patch
queue-3.15/rtmutex-handle-deadlock-detection-smarter.patch
queue-3.15/usb-gadget-rename-config_usb_gadget_pxa25x.patch
queue-3.15/media-exynos4-is-fix-compilation-for-config_common_clk.patch
queue-3.15/libiscsi-iser-adjust-data_length-to-include-protection-information.patch
queue-3.15/scsi_cmnd-introduce-scsi_transfer_length-helper.patch
queue-3.15/arm-omap-replace-checks-for-config_usb_gadget_omap.patch
queue-3.15/extcon-max14577-fix-probe-failure-on-successful-work-queue.patch
queue-3.15/arm-stacktrace-avoid-listing-stacktrace-functions-in-stacktrace.patch
queue-3.15/arm-mvebu-dt-fix-openblocks-ax3-4-ram-size.patch
queue-3.15/btrfs-fix-scrub_print_warning-to-handle-skinny-metadata-extents.patch
queue-3.15/target-iser-fix-hangs-in-connection-teardown.patch
queue-3.15/mm-memory-failure.c-support-use-of-a-dedicated-thread-to-handle-sigbus-bus_mceerr_ao.patch
queue-3.15/kthread-fix-return-value-of-kthread_create-upon-sigkill.patch
queue-3.15/usb-sierra-fix-aa-deadlock-in-open-error-path.patch
queue-3.15/btrfs-make-sure-there-are-not-any-read-requests-before-stopping-workers.patch
queue-3.15/staging-tidspbridge-check-for-config_snd_omap_soc_mcbsp.patch
queue-3.15/printk-of_serial-fix-serial-console-cessation-part-way-through-boot.patch
queue-3.15/btrfs-don-t-check-nodes-for-extent-items.patch
queue-3.15/acpi-hotplug-pci-add-hotplug-contexts-to-pci-host-bridges.patch
queue-3.15/usb-usbtest-fix-unlink-write-error-with-pattern-1.patch
queue-3.15/usb-usb_wwan-fix-potential-null-deref-at-resume.patch
queue-3.15/btrfs-fix-null-pointer-crash-of-deleting-a-seed-device.patch
queue-3.15/usb-sierra-fix-urb-and-memory-leak-on-disconnect.patch
queue-3.15/btrfs-allocate-raid-type-kobjects-dynamically.patch
queue-3.15/imx-drm-fix-hdmi-hotplug-detection-initial-state.patch
queue-3.15/regulator-s2mpa01-use-correct-register-for-buck1-ramp-delay.patch
queue-3.15/ext4-fix-data-integrity-sync-in-ordered-mode.patch
queue-3.15/media-exynos4-is-free-fimc-is-cpu-memory-only-when-allocated.patch
queue-3.15/idr-fix-overflow-bug-during-maximum-id-calculation-at-maximum-height.patch
queue-3.15/usb-ehci-avoid-bios-handover-on-the-hasee-e200.patch
queue-3.15/applicom-dereferencing-null-on-error-path.patch
queue-3.15/cifs-fix-memory-leaks-in-smb2_open.patch
queue-3.15/media-radio-bcm2048-fix-wrong-overflow-check.patch
queue-3.15/media-ivtv-fix-oops-when-no-firmware-is-loaded.patch
queue-3.15/mm-page_alloc-use-word-based-accesses-for-get-set-pageblock-bitmaps.patch
queue-3.15/usb-qcserial-add-additional-sierra-wireless-qmi-devices.patch
queue-3.15/target-use-complete_all-for-se_cmd-t_transport_stop_comp.patch
queue-3.15/matroxfb-perform-a-dummy-read-of-m_status.patch
queue-3.15/btrfs-set-right-total-device-count-for-seeding-support.patch
queue-3.15/usb-usb_wwan-fix-urb-leak-at-shutdown.patch
queue-3.15/btrfs-mark-mapping-with-error-flag-to-report-errors-to-userspace.patch
queue-3.15/extcon-max77693-fix-two-null-pointer-exceptions-on-missing-pdata.patch
queue-3.15/arm64-uid16-fix-__kernel_old_-gid-uid-_t-definitions.patch
queue-3.15/btrfs-add-ctime-mtime-update-for-btrfs-device-add-remove.patch
queue-3.15/arm64-dma-removing-arch_has_dma_get_required_mask-macro.patch
queue-3.15/mm-memory-failure.c-failure-send-right-signal-code-to-correct-thread.patch
queue-3.15/usb-serial-fix-potential-runtime-pm-imbalance-at-device-remove.patch
queue-3.15/aio-fix-kernel-memory-disclosure-in-io_getevents-introduced-in-v3.10.patch
queue-3.15/btrfs-send-use-the-right-limits-for-xattr-names-and-values.patch
queue-3.15/media-stk1160-avoid-stack-allocated-buffer-for-control-urbs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]