Bug 144953 - [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
Summary: [SOUP] Network Cache: NetworkProcess segfault when file system doesn't suppor...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Soup
Depends on:
Blocks:
 
Reported: 2015-05-13 09:53 PDT by Ting-Wei Lan
Modified: 2015-05-13 23:21 PDT (History)
1 user (show)

See Also:


Attachments
Patch (1.53 KB, patch)
2015-05-13 09:59 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ting-Wei Lan 2015-05-13 09:53:35 PDT
tmpfs doesn't support user_xattr on Linux. Therefore, if an user have its ~/.cache/epiphany on tmpfs, setting xattr::birthtime fails. When WebKit tries to read the value back in Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystemPosix.h, it will pass a null pointer to g_ascii_strtoull. This can cause segfault in WebKitNetworkProcess.
Comment 1 Ting-Wei Lan 2015-05-13 09:57:48 PDT
This problem also causes WebKitNetworkProcess to segfault on FreeBSD because it doesn't support xattr. Fortunately, FreeBSD has st_birthtime field in struct stat, so we can reuse PLATFORM(COCOA) code in NetworkCacheFileSystemPosix.h.
Comment 2 Carlos Garcia Campos 2015-05-13 09:59:24 PDT
Created attachment 253035 [details]
Patch
Comment 3 Carlos Garcia Campos 2015-05-13 10:02:48 PDT
(In reply to comment #1)
> This problem also causes WebKitNetworkProcess to segfault on FreeBSD because
> it doesn't support xattr. Fortunately, FreeBSD has st_birthtime field in
> struct stat, so we can reuse PLATFORM(COCOA) code in
> NetworkCacheFileSystemPosix.h.

Cool, that's a different issue, though. Could you file another bug report for that?
Comment 4 Carlos Garcia Campos 2015-05-13 23:00:50 PDT
Committed r184330: <http://trac.webkit.org/changeset/184330>
Comment 5 Ting-Wei Lan 2015-05-13 23:21:35 PDT
(In reply to comment #3)
> (In reply to comment #1)
> > This problem also causes WebKitNetworkProcess to segfault on FreeBSD because
> > it doesn't support xattr. Fortunately, FreeBSD has st_birthtime field in
> > struct stat, so we can reuse PLATFORM(COCOA) code in
> > NetworkCacheFileSystemPosix.h.
> 
> Cool, that's a different issue, though. Could you file another bug report
> for that?

https://bugs.webkit.org/show_bug.cgi?id=144989