Skip to content
Snippets Groups Projects
  1. Nov 07, 2017
  2. Oct 06, 2017
  3. Oct 05, 2017
    • Takashi Iwai's avatar
      ALSA: seq: Fix race at timer setup and close · f9d0f15c
      Takashi Iwai authored
      
      commit 3567eb6a upstream.
      
      ALSA sequencer code has an open race between the timer setup ioctl and
      the close of the client.  This was triggered by syzkaller fuzzer, and
      a use-after-free was caught there as a result.
      
      This patch papers over it by adding a proper queue->timer_mutex lock
      around the timer-related calls in the relevant code path.
      
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Tested-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarAmit Pundir <amit.pundir@linaro.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f9d0f15c
    • Hector Marco-Gisbert's avatar
      UPSTREAM: x86/mm/32: Enable full randomization on i386 and X86_32 · d6dee0cc
      Hector Marco-Gisbert authored
      
      Currently on i386 and on X86_64 when emulating X86_32 in legacy mode, only
      the stack and the executable are randomized but not other mmapped files
      
      libraries, vDSO and mmap requests on i386 and in X86_32 in legacy mode.
      
      By default on i386 there are 8 bits for the randomization of the libraries,
      vDSO and mmaps which only uses 1MB of VA.
      
      This patch preserves the original randomness, using 1MB of VA out of 3GB or
      4GB. We think that 1MB out of 3GB is not a big cost for having the ASLR.
      
      The first obvious security benefit is that all objects are randomized (not
      only the stack and the executable) in legacy mode which highly increases
      the ASLR effectiveness, otherwise the attackers may use these
      non-randomized areas. But also sensitive setuid/setgid applications are
      more secure because currently, attackers can disable the randomization of
      these applications by setting the ulimit stack to "unlimited". This is a
      very old and widely known trick to disable the ASLR in i386 which has been
      allowed for too long.
      
      Another trick used to disable the ASLR was to set the ADDR_NO_RANDOMIZE
      personality flag, but fortunately this doesn't work on setuid/setgid
      applications because there is security checks which clear Security-relevant
      flags.
      
      This patch always randomizes the mmap_legacy_base address, removing the
      possibility to disable the ASLR by setting the stack to "unlimited".
      
      Signed-off-by: default avatarHector Marco-Gisbert <hecmargi@upv.es>
      Acked-by: default avatarIsmael Ripoll Ripoll <iripoll@upv.es>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Acked-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: akpm@linux-foundation.org
      Cc: kees Cook <keescook@chromium.org>
      Link: http://lkml.kernel.org/r/1457639460-5242-1-git-send-email-hecmargi@upv.es
      
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      
      Bug: 28763575
      Change-Id: Icd128489c3c196ade64f79d4ea898d29f8471baf
      (cherry picked from commit 8b8addf8)
      d6dee0cc
  4. Apr 04, 2017
    • Greg Kroah-Hartman's avatar
      ANDROID: android-base.cfg: enable UID_SYS_STATS · 2635a5d1
      Greg Kroah-Hartman authored
      
      Somehow the config option forgot to be enabled in the 3.18 backport of
      this driver (it got renamed as well.)  So enable it so that people know
      it is required.
      
      Bug: 35803310
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      2635a5d1
    • Dmitry Shmidt's avatar
      android: base-cfg: Add CONFIG_INET_DIAG_DESTROY · 57b9c747
      Dmitry Shmidt authored
      
      Change-Id: I67430b05eca8fd520d2795d3db60faf2ec0fab9e
      Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
      (cherry picked from commit 03fbd079)
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      57b9c747
    • Rob Herring's avatar
      config: android: set SELinux as default security mode · f0f18736
      Rob Herring authored
      Android won't boot without SELinux enabled, so make it the default.
      
      Link: http://lkml.kernel.org/r/20160908185934.18098-2-robh@kernel.org
      
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      (cherry picked from commit d90ae51a)
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      f0f18736
    • Rob Herring's avatar
      config: android: move device mapper options to recommended · a010fcaa
      Rob Herring authored
      CONFIG_MD is in recommended, but other dependent options like DM_CRYPT and
      DM_VERITY options are in base.  The result is the options in base don't
      get enabled when applying both base and recommended fragments.  Move all
      the options to recommended.
      
      Link: http://lkml.kernel.org/r/20160908185934.18098-1-robh@kernel.org
      
      
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Cc: Amit Pundir <amit.pundir@linaro.org>
      Cc: Dmitry Shmidt <dimitrysh@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      (cherry picked from commit f023a395)
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      a010fcaa
    • Greg Kroah-Hartman's avatar
      ANDROID: android-base.cfg: add CONFIG_MODULES option · 56f22e65
      Greg Kroah-Hartman authored
      
      This adds CONFIG_MODULES, CONFIG_MODULE_UNLOAD, and CONFIG_MODVERSIONS
      which are required by the O release.
      
      Bug: 35803310
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      56f22e65
    • Greg Kroah-Hartman's avatar
      ANDROID: android-base.cfg: add CONFIG_IKCONFIG option · 7d9280f5
      Greg Kroah-Hartman authored
      
      This adds CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC options, which are a
      requirement for the O release.
      
      Bug: 35803310
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      7d9280f5
    • Greg Kroah-Hartman's avatar
      ANDROID: android-base.cfg: properly sort the file · 49713319
      Greg Kroah-Hartman authored
      
      It somehow got out of alphabetical order, fix it to make merges and
      testing easier.
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      49713319
    • Greg Kroah-Hartman's avatar
      Merge 3.18.48 into android-3.18 · 14855f95
      Greg Kroah-Hartman authored
      
      Changes in 3.18.48:
      	module: fix types of device tables aliases
      	MODULE_DEVICE_TABLE: fix some callsites
      	atm: iphase: fix misleading indention
      	paride: fix the "verbose" module param
      	net: caif: fix misleading indentation
      	Disable "frame-address" warning
      	netfilter: Fix switch statement warnings with recent gcc.
      	Bluetooth: make hci_test_bit's addr const
      	ata: hpt366: fix constant cast warning
      	HID: hid-input: Add parentheses to quell gcc warning
      	ALSA: oxygen: Fix logical-not-parentheses warning
      	x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
      	s3c-camif: fix compiler warnings
      	netfilter; Add some missing default cases to switch statements in nft_reject.
      	mtd: blkdevs: fix switch-bool compilation warning
      	media: remove unused variable that causes a warning
      	drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer
      	iwlegacy: avoid warning about missing braces
      	be2iscsi: Fix bogus WARN_ON length check
      	i40e: Reduce stack in i40e_dbg_dump_desc
      	bfa: Fix indentation
      	Staging: iio: adc: fix indent on break statement
      	xilinx usb2 gadget: get rid of incredibly annoying compile warning
      	Staging: lustre: missing curly braces in ll_setattr_raw()
      	staging: rtl8723au: core: rtw_wlan_util: fix misleading indentation
      	usb: renesas_usbhs: fix build warning if 64-bit architecture
      	x86/boot: Add CONFIG_PARAVIRT_SPINLOCKS quirk to arch/x86/boot/compressed/misc.h
      	spi: dw-mid: refactor to use helpers
      	blk: rq_data_dir() should not return a boolean
      	net:Add sysctl_max_skb_frags
      	drm/i915: cleanup some indenting
      	Documentation: Remove ZBOOT MMC/SDHI utility and docs
      	Fix "crypto: algif_hash - Require setkey before accept(2)"
      	Fix "tunnels: Don't apply GRO to multiple layers of encapsulation."
      	Fix "qla2xxx: terminate exchange when command is aborted by LIO"
      	Linux 3.18.48
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      14855f95
    • Greg Kroah-Hartman's avatar
      Merge 3.18.47 into android-3.18 · 9a41ca54
      Greg Kroah-Hartman authored
      
      Changes in 3.18.47:
      	usb: gadget: composite: correctly initialize ep->maxpacket
      	drm/gma500: Add compat ioctl
      	scsi: megaraid_sas: For SRIOV enabled firmware, ensure VF driver waits for 30secs before reset
      	PCI: Check for PME in targeted sleep state
      	USB: UHCI: report non-PME wakeup signalling for Intel hardware
      	regulator: stw481x-vmmc: fix ages old enable error
      	crypto: caam - fix AEAD givenc descriptors
      	ext4: fix mballoc breakage with 64k block size
      	ext4: fix stack memory corruption with 64k block size
      	staging: comedi: ni_mio_common: fix M Series ni_ai_insn_read() data mask
      	ssb: Fix error routine when fallback SPROM fails
      	usb: hub: Fix auto-remount of safely removed or ejected USB-3 devices
      	ext4: sanity check the block and cluster size at mount time
      	ext4: use more strict checks for inodes_per_block on mount
      	ext4: add sanity checking to count_overhead()
      	KVM: PPC: Book3S HV: Save/restore XER in checkpointed register state
      	dm crypt: mark key as invalid until properly loaded
      	ALSA: hda - fix headset-mic problem on a Dell laptop
      	f2fs: set ->owner for debugfs status file's file_operations
      	md/raid5: limit request size according to implementation limits
      	thermal: hwmon: Properly report critical temperature in sysfs
      	USB: serial: kl5kusb105: fix open error path
      	powerpc/ps3: Fix system hang with GCC 5 builds
      	Btrfs: fix tree search logic when replaying directory entry deletes
      	block: protect iterate_bdevs() against concurrent close
      	xfs: set AGI buffer type in xlog_recover_clear_agi_bucket
      	ALSA: usb-audio: Fix race at stopping the stream
      	mmc: sdhci: Fix recovery from tuning timeout
      	USB: cdc-acm: add device id for GW Instek AFG-125
      	CIFS: Fix missing nls unload in smb2_reconnect()
      	CIFS: Fix a possible memory corruption in push locks
      	CIFS: Fix a possible memory corruption during reconnect
      	drm/radeon: add additional pci revision to dpm workaround
      	arm/xen: Use alloc_percpu rather than __alloc_percpu
      	dm space map metadata: fix 'struct sm_metadata' leak on failed create
      	ALSA: usb-audio: Add QuickCam Communicate Deluxe/S7500 to volume_control_quirks
      	USB: serial: option: add support for Telit LE922A PIDs 0x1040, 0x1041
      	USB: serial: option: add dlink dwm-158
      	fgraph: Handle a case where a tracer ignores set_graph_notrace
      	nfs_write_end(): fix handling of short copies
      	ext4: return -ENOMEM instead of success
      	SUNRPC: fix refcounting problems with auth_gss messages.
      	kconfig/nconf: Fix hang when editing symbol with a long prompt
      	s390/vmlogrdr: fix IUCV buffer allocation
      	ALSA: hiface: Fix M2Tech hiFace driver sampling rate change
      	libceph: verify authorize reply on connect
      	Input: drv260x - fix input device's parent assignment
      	block_dev: don't test bdev->bd_contains when it is not stable
      	IPoIB: Avoid reading an uninitialized member variable
      	scsi: avoid a permanent stop of the scsi device's request queue
      	target/user: Fix use-after-free of tcmu_cmds if they are expired
      	drivers/gpu/drm/ast: Fix infinite loop if read fails
      	Revert "ALSA: usb-audio: Fix race at stopping the stream"
      	IB/cma: Fix a race condition in iboe_addr_get_sgid()
      	fs: exec: apply CLOEXEC before changing dumpable task flags
      	sg_write()/bsg_write() is not fit to be called under KERNEL_DS
      	ipip: Properly mark ipip GRO packets as encapsulated.
      	net: ipv4: Convert IP network timestamps to be y2038 safe
      	net: Use more bit fields in napi_gro_cb
      	tunnels: Don't apply GRO to multiple layers of encapsulation.
      	gro: Allow tunnel stacking in the case of FOU/GUE
      	Linux 3.18.47
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      9a41ca54
    • Greg Kroah-Hartman's avatar
      Merge 3.18.46 into android-3.18 · ae0b9870
      Greg Kroah-Hartman authored
      
      Changes in 3.18.46:
      	scsi: megaraid_sas: fix macro MEGASAS_IS_LOGICAL to avoid regression
      	bus: arm-ccn: Provide required event arguments
      	bus: arm-ccn: Fix PMU handling of MN
      	drm/msm: fix use of copy_from_user() while holding spinlock
      	mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl
      	cpuset: handle race between CPU hotplug and cpuset_hotplug_work
      	can: dev: fix deadlock reported after bus-off
      	mm,ksm: fix endless looping in allocating memory when ksm enable
      	ARM: 8617/1: dma: fix dma_max_pfn()
      	x86/init: Fix cr4_init_shadow() on CR4-less machines
      	scripts/has-stack-protector: add -fno-PIE
      	x86/kexec: add -fno-PIE
      	tcp: fix use after free in tcp_xmit_retransmit_queue()
      	fuse: Propagate dentry down to inode_change_ok()
      	nfsd: Disable NFSv2 timestamp workaround for NFSv3+
      	scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
      	Bluetooth: Fix potential NULL dereference in RFCOMM bind callback
      	packet: fix race condition in packet_set_ring
      	Linux 3.18.46
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      ae0b9870
    • Greg Kroah-Hartman's avatar
      Merge 3.18.45 into android-3.18 · 3731a4b3
      Greg Kroah-Hartman authored
      
      Changes in 3.18.45:
      	udp: properly support MSG_PEEK with truncated buffers
      	mmc: core: Annotate cmd_hdr as __le32
      	scsi: Fix use-after-free
      	jbd2: fix incorrect unlock on j_list_lock
      	drm/radeon: change vblank_time's calculation method to reduce computational error.
      	irqchip/gicv3: Handle loop timeout proper
      	usb: gadget: function: u_ether: don't starve tx request queue
      	mmc: sdhci: cast unsigned int to unsigned long long to avoid unexpeted error
      	mmc: rtsx_usb_sdmmc: Avoid keeping the device runtime resumed when unused
      	mmc: rtsx_usb_sdmmc: Handle runtime PM while changing the led
      	memstick: rtsx_usb_ms: Runtime resume the device when polling for cards
      	memstick: rtsx_usb_ms: Manage runtime PM when accessing the device
      	USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7
      	isofs: Do not return EACCES for unknown filesystems
      	powerpc/mm: Prevent unlikely crash in copro_calculate_slb()
      	ubifs: Fix xattr_names length in exit paths
      	target: Don't override EXTENDED_COPY xcopy_pt_cmd SCSI status code
      	libxfs: clean up _calc_dquots_per_chunk
      	xhci: add restart quirk for Intel Wildcatpoint PCH
      	USB: serial: fix potential NULL-dereference at probe
      	usb: increase ohci watchdog delay to 275 msec
      	dm table: fix missing dm_put_target_type() in dm_table_add_target()
      	mei: txe: don't clean an unprocessed interrupt cause.
      	hv: do not lose pending heartbeat vmbus packets
      	KEYS: Fix short sprintf buffer in /proc/keys show function
      	ALSA: usb-audio: Add quirk for Syntek STK1160
      	tty: limit terminal size to 4M chars
      	vt: clear selection before resizing
      	btrfs: fix races on root_log_ctx lists
      	GenWQE: Fix bad page access during abort of resource allocation
      	mac80211: discard multicast and 4-addr A-MSDUs
      	Input: i8042 - add XMG C504 to keyboard reset table
      	USB: serial: cp210x: fix tiocmget error handling
      	drm/radeon/si/dpm: add workaround for for Jet parts
      	drm/radeon/si_dpm: Limit clocks on HD86xx part
      	powerpc: Convert cmp to cmpd in idle enter sequence
      	scsi: megaraid_sas: Fix data integrity failure for JBOD (passthrough) devices
      	drm/radeon: drop register readback in cayman_cp_int_cntl_setup
      	KVM: MIPS: Make ERET handle ERL before EXL
      	drm/radeon/si_dpm: workaround for SI kickers
      	scsi: scsi_debug: Fix memory leak if LBP enabled and module is unloaded
      	scsi: arcmsr: Send SYNCHRONIZE_CACHE command to firmware
      	md: sync sync_completed has correct value as recovery finishes.
      	md: be careful not lot leak internal curr_resync value into metadata. -- (all)
      	virtio: console: Unlock vqs while freeing buffers
      	ovl: fsync after copy-up
      	parisc: Ensure consistent state when switching to kernel stack at syscall entry
      	firewire: net: guard against rx buffer overflows
      	firewire: net: fix fragmented datagram_size off-by-one
      	kbuild: add -fno-PIE
      	Linux 3.18.45
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      3731a4b3
    • Greg Kroah-Hartman's avatar
      Merge 3.18.44 into android-3.18 · c7547e75
      Greg Kroah-Hartman authored
      
      Changes in 3.18.44:
      	mm: remove gup_flags FOLL_WRITE games from __get_user_pages()
      	x86/cpu: Fix SMAP check in PVOPS environments
      	xhci: fix usb2 resume timing and races.
      	Linux 3.18.44
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      c7547e75
    • Greg Kroah-Hartman's avatar
      Merge 3.18.43 into android-3.18 · 196fa096
      Greg Kroah-Hartman authored
      
      Changes in 3.18.43:
      	MIPS: KVM: Check for pfn noslot case
      	ovl: fix workdir creation
      	ARM: OMAP3: hwmod data: Add sysc information for DSI
      	Revert "wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel"
      	bus: arm-ccn: Do not attempt to configure XPs for cycle counter
      	bus: arm-ccn: Fix XP watchpoint settings bitmask
      	ARM: kirkwood: ib62x0: fix size of u-boot environment partition
      	ALSA: timer: fix division by zero after SNDRV_TIMER_IOCTL_CONTINUE
      	ALSA: timer: fix NULL pointer dereference on memory allocation failure
      	ALSA: usb-audio: Add sample rate inquiry quirk for B850V3 CP2114
      	ARM: imx6: add missing BM_CLPCR_BYPASS_PMIC_READY setting for imx6sx
      	ALSA: fireworks: accessing to user space outside spinlock
      	iio: accel: kxsd9: Fix scaling bug
      	sched/core: Fix a race between try_to_wake_up() and a woken up task
      	usb: renesas_usbhs: fix clearing the {BRDY,BEMP}STS condition
      	Btrfs: add missing blk_finish_plug in btrfs_sync_log()
      	Btrfs: remove root_log_ctx from ctx list before btrfs_sync_log returns
      	ipv6: addrconf: fix dev refcont leak when DAD failed
      	crypto: cryptd - initialize child shash_desc on import
      	powerpc/mm: Don't alias user region to other regions below PAGE_OFFSET
      	xhci: fix null pointer dereference in stop command timeout function
      	ALSA: timer: Call notifier in the same spinlock
      	ALSA: timer: Fix zero-division by continue of uninitialized instance
      	kvm-arm: Unmap shadow pagetables properly
      	arm64: spinlocks: implement smp_mb__before_spinlock() as smp_mb()
      	asm-generic: make copy_from_user() zero the destination properly
      	USB: serial: simple: add support for another Infineon flashloader
      	crypto: skcipher - Fix blkcipher walk OOM crash
      	crypto: arm64/aes-ctr - fix NULL dereference in tail processing
      	MIPS: paravirt: Fix undefined reference to smp_bootstrap
      	genirq: Generic chip: Change irq_reg_{readl,writel} arguments
      	genirq: Provide irq_gc_{lock_irqsave,unlock_irqrestore}() helpers
      	MIPS: Add a missing ".set pop" in an early commit
      	nl80211: validate number of probe response CSA counters
      	asm-generic: {get,put}_user ptr argument evaluate only 1 time
      	asm-generic: make get_user() clear the destination on errors
      	frv: fix clear_user()
      	hexagon: fix strncpy_from_user() error return
      	ia64: copy_from_user() should zero the destination on access_ok() failure
      	metag: copy_from_user() should zero the destination on access_ok() failure
      	ARC: uaccess: get_user to zero out dest in cause of fault
      	mips: copy_from_user() must zero the destination on access_ok() failure
      	mn10300: failing __get_user() and get_user() should zero
      	mn10300: copy_from_user() should zero on access_ok() failure...
      	openrisc: fix copy_from_user()
      	parisc: fix copy_from_user()
      	ppc32: fix copy_from_user()
      	s390: get_user() should zero on failure
      	score: fix __get_user/get_user
      	score: fix copy_from_user() and friends
      	sh64: failing __get_user() should zero
      	sh: fix copy_from_user()
      	sparc32: fix copy_from_user()
      	blackfin: fix copy_from_user()
      	m32r: fix __get_user()
      	microblaze: fix copy_from_user()
      	microblaze: fix __get_user()
      	avr32: fix copy_from_user()
      	fix minor infoleak in get_user_ex()
      	USB: change bInterval default to 10 ms
      	can: flexcan: fix resume function
      	ocfs2/dlm: fix race between convert and migration
      	autofs races
      	autofs: use dentry flags to block walks during expire
      	fsnotify: add a way to stop queueing events on group shutdown
      	fanotify: fix list corruption in fanotify_get_response()
      	ocfs2: fix start offset to ocfs2_zero_range_for_truncate()
      	fix fault_in_multipages_...() on architectures with no-op access_ok()
      	btrfs: ensure that file descriptor used with subvol ioctls is a dir
      	block: Do a full clone when splitting discard bios
      	hexagon: Fix build failures in linux-next
      	avr32: fix 'undefined reference to `___copy_from_user'
      	ARM: orion: convert the irq_reg_{readl,writel} calls to the new API
      	openrisc: fix the fix of copy_from_user()
      	Linux 3.18.43
      
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
      196fa096
Loading