alpine 3.6
shell weakness #10

4

Weakness Breakdown


Definition:

A shell weakness occurs when a program enables an attacker to execute unexpected commands on the operating system.

Warning code(s):

This causes a new program to execute and is difficult to use safely.

File Name:

gnome-vfs/src/gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-unix-mounts.c

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.6 shell weakness.

 		    	mount_entry->is_read_only = TRUE;
		}

#ifdef HAVE_SYS_SYSCTL_H
		if (usermnt != 0) {
			uid_t uid = getuid ();
			if (stat (fstab->fs_file, &sb) == 0) {
				if (uid == 0 || sb.st_uid == uid) {
					mount_entry->is_user_mountable = TRUE;
				}
			}
		}
#endif

		*return_list = g_list_prepend (*return_list, mount_entry);
	}

	endfsent ();

	*return_list = g_list_reverse (*return_list);

	return TRUE;
}
#else
#error No _gnome_vfs_get_mount_table() implementation for system
#endif
 

static GnomeVFSMonitorHandle *fstab_monitor = NULL;
static GnomeVFSUnixMountCallback fstab_callback = NULL;
static GnomeVFSMonitorHandle *mtab_monitor = NULL;
static GnomeVFSUnixMountCallback mtab_callback = NULL;
static guint mtab_poll_tag = 0;
static guint fstab_poll_tag = 0;

static void
fstab_monitor_callback (GnomeVFSMonitorHandle *handle,
			const char *monitor_uri,
			const char *info_uri,
			GnomeVFSMonitorEventType event_type,
			gpointer user_data)
{
	(*fstab_callback) (user_data);
}

static void
mtab_monitor_callback (GnomeVFSMonitorHandle *handle,
		       const char *monitor_uri,
		       const char *info_uri,
		       GnomeVFSMonitorEventType event_type, 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.