Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148786638
D1524.id3162.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
608 B
Referenced Files
None
Subscribers
None
D1524.id3162.diff
View Options
Index: usr.bin/ar/read.c
===================================================================
--- usr.bin/ar/read.c
+++ usr.bin/ar/read.c
@@ -187,7 +187,15 @@
if (bsdar->options & AR_V)
(void)fprintf(stdout, "x - %s\n", name);
- flags = 0;
+ /* Disallow absolute paths. */
+ if (name[0] == '/') {
+ bsdar_warnc(bsdar, 0,
+ "Absolute path '%s'", name);
+ continue;
+ }
+ /* Basic path security flags. */
+ flags = ARCHIVE_EXTRACT_SECURE_SYMLINKS | \
+ ARCHIVE_EXTRACT_SECURE_NODOTDOT;
if (bsdar->options & AR_O)
flags |= ARCHIVE_EXTRACT_TIME;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 21, 5:31 AM (19 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30007160
Default Alt Text
D1524.id3162.diff (608 B)
Attached To
Mode
D1524: ar: Disallow directory traversal
Attached
Detach File
Event Timeline
Log In to Comment