All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch added to 3.12-stable] proc: Fix ptrace-based permission checks for accessing task maps
@ 2016-03-03 12:10 Jiri Slaby
  2016-03-03 12:10 ` [patch added to 3.12-stable] usb: musb: cppi41: correct the macro name EP_MODE_AUTOREG_* Jiri Slaby
                   ` (111 more replies)
  0 siblings, 112 replies; 116+ messages in thread
From: Jiri Slaby @ 2016-03-03 12:10 UTC (permalink / raw)
  To: stable; +Cc: Corey Wright, Jiri Slaby

From: Corey Wright <undefined@pobox.com>

This patch has been added to the 3.12 stable tree. If you have any
objections, please let us know.

===============

Modify mm_access() calls in fs/proc/task_mmu.c and fs/proc/task_nommu.c to
have the mode include PTRACE_MODE_FSCREDS so accessing /proc/pid/maps and
/proc/pid/pagemap is not denied to all users.

In backporting upstream commit caaee623 to pre-3.18 kernel versions it was
overlooked that mm_access() is used in fs/proc/task_*mmu.c as those calls
were removed in 3.18 (by upstream commit 29a40ace) and did not exist at the
time of the original commit.

Fixes: caaee6234d ("ptrace: use fsuid, fsgid, effective creds for fs access checks")
Signed-off-by: Corey Wright <undefined@pobox.com>
Acked-by: Jann Horn <jann@thejh.net>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 fs/proc/task_mmu.c   | 4 ++--
 fs/proc/task_nommu.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index d20f37d1c6e7..4fe8b1082cf3 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -172,7 +172,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
 	if (!priv->task)
 		return ERR_PTR(-ESRCH);
 
-	mm = mm_access(priv->task, PTRACE_MODE_READ);
+	mm = mm_access(priv->task, PTRACE_MODE_READ_FSCREDS);
 	if (!mm || IS_ERR(mm))
 		return mm;
 	down_read(&mm->mmap_sem);
@@ -1186,7 +1186,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
 	if (!pm.buffer)
 		goto out_task;
 
-	mm = mm_access(task, PTRACE_MODE_READ);
+	mm = mm_access(task, PTRACE_MODE_READ_FSCREDS);
 	ret = PTR_ERR(mm);
 	if (!mm || IS_ERR(mm))
 		goto out_free;
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 56123a6f462e..123c19890b14 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -223,7 +223,7 @@ static void *m_start(struct seq_file *m, loff_t *pos)
 	if (!priv->task)
 		return ERR_PTR(-ESRCH);
 
-	mm = mm_access(priv->task, PTRACE_MODE_READ);
+	mm = mm_access(priv->task, PTRACE_MODE_READ_FSCREDS);
 	if (!mm || IS_ERR(mm)) {
 		put_task_struct(priv->task);
 		priv->task = NULL;
-- 
2.7.2


^ permalink raw reply related	[flat|nested] 116+ messages in thread

end of thread, other threads:[~2016-03-31  6:59 UTC | newest]

Thread overview: 116+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-03 12:10 [patch added to 3.12-stable] proc: Fix ptrace-based permission checks for accessing task maps Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] usb: musb: cppi41: correct the macro name EP_MODE_AUTOREG_* Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] af_iucv: Validate socket address length in iucv_sock_bind() Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] net: dp83640: Fix tx timestamp overflow handling Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] tcp: fix NULL deref in tcp_v4_send_ack() Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] af_unix: fix struct pid memory leak Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] pptp: fix illegal memory access caused by multiple bind()s Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] sctp: allow setting SCTP_SACK_IMMEDIATELY by the application Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] ipv6/udp: use sticky pktinfo egress ifindex on connect() Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] net/ipv6: add sysctl option accept_ra_min_hop_limit Jiri Slaby
2016-03-28 10:01   ` Luis Henriques
2016-03-31  6:57     ` Jiri Slaby
2016-03-31  6:59       ` Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] ipv6: fix a lockdep splat Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] net:Add sysctl_max_skb_frags Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] tg3: Fix for tg3 transmit queue 0 timed out when too many gso_segs Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] sctp: translate network order to host order when users get a hmacid Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] bonding: fix bond_arp_rcv() race of curr_active_slave Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] bonding: Fix ARP monitor validation Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] ipv4: fix memory leaks in ip_cmsg_send() callers Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] af_unix: Guard against other == sk in unix_dgram_sendmsg Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] qmi_wwan: add "4G LTE usb-modem U901" Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] net/mlx4_en: Count HW buffer overrun only once Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] net/mlx4_en: Choose time-stamping shift value according to HW frequency Jiri Slaby
2016-03-03 12:10 ` [patch added to 3.12-stable] pppoe: fix reference counting in PPPoE proxy Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] route: check and remove route cache when we get route Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] rtnl: RTM_GETNETCONF: fix wrong return value Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] unix_diag: fix incorrect sign extension in unix_lookup_by_ino Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sctp: Fix port hash table size computation Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] tracepoints: Do not trace when cpu is offline Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] drm/ast: Initialized data needed to map fbdev memory Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] bcache: fix a leak in bch_cached_dev_run() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] bcache: unregister reboot notifier if bcache fails to unregister device Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] dm thin metadata: fix bug when taking a metadata snapshot Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] can: ems_usb: Fix possible tx overflow Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] USB: cp210x: add IDs for GE B650V3 and B850V3 boards Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] USB: option: add support for SIM7100E Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] USB: option: add "4G LTE usb-modem U901" Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] iw_cxgb3: Fix incorrectly returning error on success Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] splice: sendfile() at once fails for big files Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] Failing to send a CLOSE if file is opened WRONLY and server reboots on a 4.x mount Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] bnx2x: Don't notify about scratchpad parities Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched: Clean up idle task SMP logic Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched: Replace post_schedule with a balance callback list Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched: Allow balance callbacks for check_class_changed() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched,rt: Remove return value from pull_rt_task() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched, rt: Convert switched_{from, to}_rt() / prio_changed_rt() to balance callbacks Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] genirq: Prevent chip buslock deadlock Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] dts: vt8500: Add SDHC node to DTS file for WM8650 Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] clocksource/drivers/vt8500: Increase the minimum delta Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] drm/radeon: make rv770_set_sw_state failures non-fatal Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] lockd: create NSM handles per net namespace Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] devres: fix a for loop bounds check Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] wm831x_power: Use IRQF_ONESHOT to request threaded IRQs Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] dmaengine: dw: convert to __ffs() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] megaraid_sas: Do not use PAGE_SIZE for max_sectors Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] megaraid_sas : SMAP restriction--do not access user memory from IOCTL code Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] storvsc: Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] mmc: remove bondage between REQ_META and reliable write Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] mac: validate mac_partition is within sector Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] vfs: Avoid softlockups with sendfile(2) Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] target: Fix race for SCF_COMPARE_AND_WRITE_POST checking Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] target: fix COMPARE_AND_WRITE non zero SGL offset data corruption Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] ring-buffer: Update read stamp with first real commit on page Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] virtio: fix memory leak of virtio ida cache layers Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] mac80211: mesh: fix call_rcu() usage Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched/core: Clear the root_domain cpumasks in init_rootdomain() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sched/core: Remove false-positive warning from wake_up_process() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] sata_sil: disable trim Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] dm space map metadata: fix ref counting bug when bootstrapping a new space map Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] dm btree: fix bufio buffer leaks in dm_btree_del() error path Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] vgaarb: fix signal handling in vga_get() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] rfkill: copy the name into the rfkill struct Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] ses: Fix problems with simple enclosures Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] ses: fix additional element traversal bug Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] scripts: recordmcount: break hardlinks Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] Btrfs: add missing brelse when superblock checksum fails Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] Btrfs: igrab inode in writepage Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] Btrfs: send, don't BUG_ON() when an empty symlink is found Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] Btrfs: fix number of transaction units required to create symlink Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] s390/dasd: prevent incorrect length error under z/VM after PAV changes Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] s390/dasd: fix refcount for PAV reassignment Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] uml: flush stdout before forking Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] uml: fix hostfs mknod() Jiri Slaby
2016-03-03 12:11 ` [patch added to 3.12-stable] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] gspca: ov534/topro: prevent a division by 0 Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] tda1004x: only update the frontend properties if locked Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] dm space map metadata: remove unused variable in brb_pop() Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] dm snapshot: fix hung bios when copy error occurs Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] posix-clock: Fix return code on the poll method's error path Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] mmc: sdhci: Fix sdhci_runtime_pm_bus_on/off() Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] mmc: mmci: fix an ages old detection error Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] EDAC: Robustify workqueues destruction Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] sparc64: fix incorrect sign extension in sys_sparc64_personality Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/vmwgfx: respect 'nomodeset' Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/radeon: clean up fujitsu quirks Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/radeon: hold reference to fences in radeon_sa_bo_new Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/i915/dp: fall back to 18 bpp when sink capability is unknown Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/qxl: use kmalloc_array to alloc reloc_info in qxl_process_single_command Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/radeon: use post-decrement in error handling Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] drm/radeon/pm: adjust display configuration after powerstate Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] IB/qib: fix mcast detach when qp not attached Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] hwmon: (ads1015) Handle negative conversion values correctly Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] libceph: don't bail early from try_read() when skipping a message Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] cdc-acm:exclude Samsung phone 04e8:685d Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] rfkill: fix rfkill_fop_read wait_event usage Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] libata: fix sff host state machine locking while polling Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] PCI/AER: Flush workqueue on device remove to avoid use-after-free Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] nfs: fix nfs_size_to_loff_t Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] NFSv4: Fix a dentry leak on alias use Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] KVM: async_pf: do not warn on page allocation failures Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] tracing: Fix showing function event in available_events Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] sunrpc/cache: fix off-by-one in qword_get() Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] kernel/resource.c: fix muxed resource handling in __request_region() Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] do_last(): don't let a bogus return value from ->open() et.al. to confuse us Jiri Slaby
2016-03-03 12:12 ` [patch added to 3.12-stable] xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted Jiri Slaby

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.