Andrew Geissler | 220dafd | 2023-10-04 10:18:08 -0500 | [diff] [blame] | 1 | CVE: CVE-2020-29074 |
| 2 | Upstream-Status: Backport [https://github.com/LibVNC/x11vnc/commit/69eeb9f7baa14ca03b16c9de821f9876def7a36a ] |
| 3 | Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> |
| 4 | |
| 5 | |
| 6 | From 69eeb9f7baa14ca03b16c9de821f9876def7a36a Mon Sep 17 00:00:00 2001 |
| 7 | From: =?UTF-8?q?Gu=C3=A9nal=20DAVALAN?= <guenal.davalan@uca.fr> |
| 8 | Date: Wed, 18 Nov 2020 08:40:45 +0100 |
| 9 | Subject: [PATCH] scan: limit access to shared memory segments to current user |
| 10 | |
| 11 | --- |
| 12 | src/scan.c | 2 +- |
| 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/src/scan.c b/src/scan.c |
| 16 | index 43e00d20..12994d52 100644 |
| 17 | --- a/src/scan.c |
| 18 | +++ b/src/scan.c |
| 19 | @@ -320,7 +320,7 @@ static int shm_create(XShmSegmentInfo *shm, XImage **ximg_ptr, int w, int h, |
| 20 | |
| 21 | #if HAVE_XSHM |
| 22 | shm->shmid = shmget(IPC_PRIVATE, |
| 23 | - xim->bytes_per_line * xim->height, IPC_CREAT | 0777); |
| 24 | + xim->bytes_per_line * xim->height, IPC_CREAT | 0600); |
| 25 | |
| 26 | if (shm->shmid == -1) { |
| 27 | rfbErr("shmget(%s) failed.\n", name); |