New issue
Advanced search Search tips

Issue 875717 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 27
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Crash in unrar: [SIGSYS @ 0x00000000 ] File::Write-7922739d

Project Member Reported by amistry@chromium.org, Aug 20

Issue description

Chrome Version: 70.0.3525.0
OS: Chrome

0x00007ce52d280567	(libc-2.23.so + 0x000e9567 )	dup
0x0000559053a9dde9	(unrar -file.cpp:293 )	File::Write(void const*, unsigned long)
0x0000559053aa9d44	(unrar -rdwrfn.cpp:210 )	ComprDataIO::UnpWrite(unsigned char*, unsigned long)
0x0000559053ac303f	(unrar -unpack50.cpp:519 )	Unpack::UnpWriteArea(unsigned long, unsigned long)
0x0000559053ac2256	(unrar -unpack30.cpp:616 )	Unpack::UnpWriteBuf30()
0x0000559053ab50b3	(unrar -extract.cpp:677 )	CmdExtract::ExtractCurrentFile(Archive&, unsigned long, bool&)

RAR mounts are extremely slow because unrar is constantly crashing.
 
Could you attach a rar file that reproduces the issue for reference? We can extend our test cases to cover that to prevent future regression (as platform_CrosDisksArchive is currently passing)
The test passes because avfs never calls into 'unrar' because the test rar file doesn't have any compressed files (files use -m0/STORE compression) and it doesn't use unrar for uncompressed files (https://github.com/lb1a/avfs/blob/master/modules/urar.c#L630).

% unrar lta test.rar 

UNRAR 5.30 beta 2 freeware      Copyright (c) 1993-2015 Alexander Roshal

Archive: test.rar
Details: RAR 4

        Name: dir1/file1
        Type: File
        Size: 0
 Packed size: 0
       Ratio: 0%
       mtime: 2017-10-23 18:41:22,000
  Attributes: -rw-r--r--
       CRC32: 00000000
     Host OS: Unix
 Compression: RAR 3.0(v29) -m0 -md=128K

        Name: dir1/file2
        Type: File
        Size: 7
 Packed size: 7
       Ratio: 100%
       mtime: 2017-10-23 18:41:22,000
  Attributes: -rw-r--r--
       CRC32: 312A6AA6
     Host OS: Unix
 Compression: RAR 3.0(v29) -m0 -md=128K

        Name: dir1/dir2/file3
        Type: File
        Size: 7
 Packed size: 7
       Ratio: 100%
       mtime: 2017-10-23 18:41:22,000
  Attributes: -rw-r--r--
       CRC32: 312A6AA6
     Host OS: Unix
 Compression: RAR 3.0(v29) -m0 -md=128K

        Name: file1
        Type: File
        Size: 10
 Packed size: 10
       Ratio: 100%
       mtime: 2017-10-23 18:41:22,000
  Attributes: -rw-r--r--
       CRC32: A684C7C6
     Host OS: Unix
 Compression: RAR 3.0(v29) -m0 -md=128K

        Name: dir1/dir2
        Type: Directory
       mtime: 2017-10-23 18:42:30,000
  Attributes: drwxr-x---
       CRC32: 00000000
     Host OS: Unix
 Compression: RAR 3.0(v20) -m0 -md=0K

        Name: dir1
        Type: Directory
       mtime: 2017-10-23 18:42:30,000
  Attributes: drwxr-x---
       CRC32: 00000000
     Host OS: Unix
 Compression: RAR 3.0(v20) -m0 -md=0K

     Service: EOF


Any rar archive that has non -m0 files should cause the test to fail, in theory. My test archive is quite large, so I can't attach it. I'll make a test case that fails.
FYI, this bug doesn't affect M69 since the unrar upgrade missed the 69 branch point. The first crash report is from 10906.0
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/85d9a7833030368744edc77a328354305bb79648

commit 85d9a7833030368744edc77a328354305bb79648
Author: Anand K Mistry <amistry@chromium.org>
Date: Thu Aug 23 14:36:56 2018

cros-disks: whitelist 'dup' for AVFS

The recent upgrade to unrar introduced a use of dup() to write
decompressed output to stdout.

BUG= chromium:875717 
TEST=platform_CrosDisks* autotests + manually on chell

Change-Id: I719096052f747019eb6dd9ca9262b3907f763265
Reviewed-on: https://chromium-review.googlesource.com/1180838
Commit-Ready: Anand Mistry <amistry@chromium.org>
Tested-by: Anand Mistry <amistry@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/85d9a7833030368744edc77a328354305bb79648/cros-disks/avfsd-seccomp-amd64.policy
[modify] https://crrev.com/85d9a7833030368744edc77a328354305bb79648/cros-disks/avfsd-seccomp-x86.policy
[modify] https://crrev.com/85d9a7833030368744edc77a328354305bb79648/cros-disks/avfsd-seccomp-arm.policy

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/e00f8a4e01081e02692fbf52d4abd6154bebf461

commit e00f8a4e01081e02692fbf52d4abd6154bebf461
Author: Anand K Mistry <amistry@chromium.org>
Date: Thu Aug 23 14:36:57 2018

cros-disks: Add a 'large' file to platform_CrosDisksArchive test

The small files currently in the test may not be compressed
in an archive since the compression overhead is larger than
the file contents.

BUG= chromium:875717 
CQ-DEPEND=CL:1180838
TEST=platform_CrosDisksArchive

Change-Id: I424c830d58d4b1c663c24ccbc1d18baa1994e161
Reviewed-on: https://chromium-review.googlesource.com/1182705
Commit-Ready: Anand Mistry <amistry@chromium.org>
Tested-by: Anand Mistry <amistry@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>

[modify] https://crrev.com/e00f8a4e01081e02692fbf52d4abd6154bebf461/client/cros/cros_disks.py
[modify] https://crrev.com/e00f8a4e01081e02692fbf52d4abd6154bebf461/client/site_tests/platform_CrosDisksArchive/data/test.rar

Status: Fixed (was: Assigned)

Sign in to add a comment