From MAILER-DAEMON Tue Jul 23 11:36:49 2019 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hpwqP-0002cz-40 for mharc-bug-xorriso@gnu.org; Tue, 23 Jul 2019 11:36:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47727) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpwmD-0000UK-Ta for bug-xorriso@gnu.org; Tue, 23 Jul 2019 11:32:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpwmC-0003iB-Fz for bug-xorriso@gnu.org; Tue, 23 Jul 2019 11:32:29 -0400 Received: from mail-vs1-f42.google.com ([209.85.217.42]:37682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpwmC-0003fv-9D for bug-xorriso@gnu.org; Tue, 23 Jul 2019 11:32:28 -0400 Received: by mail-vs1-f42.google.com with SMTP id v6so29100423vsq.4 for ; Tue, 23 Jul 2019 08:32:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3KfeaaGy8/HPqWxBEnwI1D3z+b7MpDIdDq0Wcj/DJeQ=; b=A4/9gdTdgcGhmoDGrUXdH1ogU/2f2ieqnMD7bXJV5PAtz+mZmFXwbFT87I7upYPCvu uZJiVFbQLO3PCDY6Q1+qGLcIPTOEMeG9SItFamCe/1f+5cxu1vxqeEMa6HnAkpewZMAh phz+fDv80gwLTJFIEZ6+/iewUWY/rYrnZpesqZRyOYn6bFdjxSqNRFxTtEjqH7/rP1LG TmHTkzmZo2R3YPmdk0V5NiVHeLoPc+El+doJzelK+NUNJ7jRSjDVfSI8YEPO0pmZhRvB byX0DLPlYOlVVQGMk7cgMhCg9zRcZTJzrC3akzL50CdQ1Myf01Hv9ttS3ZFS6e6BVED3 gTcQ== X-Gm-Message-State: APjAAAWr3Nilz2ssAatxsi77Cuz6DsUJ1KgEGtBJ8q6gm7ruRFsxzuO9 Exwi8YKUd7Pk3pPSLWKiOjAlGNLjAx3OfGC+Q3+GEan4QIhS/Q== X-Google-Smtp-Source: APXvYqy+jTuxEuMx1K1nLKLz7IC1YcOC1G39LleQI4ulzOqCaNwP2scafhszQKRix50Xu09oD5NFY60nqaOB/+Tzvn4= X-Received: by 2002:a67:ee96:: with SMTP id n22mr48413831vsp.33.1563895943016; Tue, 23 Jul 2019 08:32:23 -0700 (PDT) MIME-Version: 1.0 From: Eliska Svobodova Date: Tue, 23 Jul 2019 17:32:11 +0200 Message-ID: To: bug-xorriso@gnu.org Content-Type: multipart/mixed; boundary="00000000000027d35c058e5ae605" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.42 X-Mailman-Approved-At: Tue, 23 Jul 2019 11:36:47 -0400 Subject: [Bug-xorriso] Crash in xorriso with fix X-BeenThere: bug-xorriso@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports and support requests for GNU xorriso List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2019 15:32:31 -0000 --00000000000027d35c058e5ae605 Content-Type: multipart/alternative; boundary="00000000000027d359058e5ae603" --00000000000027d359058e5ae603 Content-Type: text/plain; charset="UTF-8" Hi, we discovered a bug which can cause Segmentation Fault. It happens when xorriso with parameter -setfacl is given a file with too many users for one file. It is caused by leaving a cursor-pointer inside reallocated memory. Exploitation: * run the script (it wil create a directory with test files) * run command: xorriso -outdev out.img -map . / -setfacl_list Test_dir/File_with_users Cause: When reallocating in xorriso/opts_p_z.c on line 927, the pointer wpt is left on the old position which is now outside allocated memory. Fix: Save where in the old memory was wpt and after realloc move it to the same position according to buf pointer. Next add a function that controls the overrun when sprinting access_acl_text into xorriso->info_text (buffer could be huge). If the printed string was too big to fit into xorriso->info_text, the function adds at the end message that the string was truncated. --00000000000027d359058e5ae603 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,
we discovered a bug which can cause Seg= mentation Fault.
It happens when xorriso with parameter -setfacl is given a file with too=20 many users for one file. It is caused by leaving a cursor-pointer inside reallocated memory.
Exploitation:
* run the script (it= wil create a directory with test files)
* run command:
xorriso -outdev out.img -map . / -setfacl_list Test_dir/File_with_use= rs
Cause:
When reallocating in xorriso/opts_p_z.c on line 927, the pointer wpt is left on the old position which is now outside allocated memory.
Fix:<= /div>
Save where in the old memory was wpt and after realloc move it to= the same position according to buf pointer.
Next add a function that controls the overrun when sprinting access_acl_text into xorriso->info_text (buffer could be huge). If the printed=20 string was too big to fit into xorriso->info_text, the function adds=20 at the end message that the string was truncated.
--00000000000027d359058e5ae603-- --00000000000027d35c058e5ae605 Content-Type: application/octet-stream; name=test_script Content-Disposition: attachment; filename=test_script Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jyfz6t4k0 IyEvYmluL2Jhc2gKCm1rZGlyIFRlc3RfZGlyCmNkIFRlc3RfZGlyCnRvdWNoIFRlc3RfZmlsZQoK Y2F0IDw8IEJlZ2lubmluZ19vZl9maWxlID4gRmlsZV93aXRoX3VzZXJzCiMgZmlsZTogVGVzdF9m aWxlCiMgb3duZXI6IGVzdm9ib2RvCiMgZ3JvdXA6IGVzdm9ib2RvCnVzZXI6OnJ3LQp1c2VyOm5v Ym9keTotLXgKZ3JvdXA6OnJ3LQptYXNrOjpyd3gKb3RoZXI6OnItLQpCZWdpbm5pbmdfb2ZfZmls ZQoKZm9yIGkgaW4gezEuLjEwMDAwfTsgZG8gZWNobyB1c2VyXyRpOjpyd3ggPj4gRmlsZV93aXRo X3VzZXJzOyBkb25lCg== --00000000000027d35c058e5ae605 Content-Type: text/x-patch; charset="US-ASCII"; name="libisoburn_invalid_pointer_after_realloc.patch" Content-Disposition: attachment; filename="libisoburn_invalid_pointer_after_realloc.patch" Content-Transfer-Encoding: base64 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2FnZSh4b3JyaXNvLCAiRGVmYXVsdC1BQ0wgOlxuIiwgZGVmYXVsdF9hY2xfdGV4 dCk7CiAgICBYb3JyaXNvX21zZ3Nfc3VibWl0KHhvcnJpc28sIDAsIHhvcnJpc28tPmluZm9fdGV4 dCwgMCwgIkRFQlVHIiwgMCk7CiAgfSBlbHNlIGlmKGFjY2Vzc19hY2xfdGV4dCA9PSBOVUxMICYm IGRlZmF1bHRfYWNsX3RleHQgPT0gTlVMTCkgewogICAgc3ByaW50Zih4b3JyaXNvLT5pbmZvX3Rl eHQsICJXaWxsIGRlbGV0ZSBBY2Nlc3MtQUNMIGFuZCBEZWZhdWx0LUFDTCIpOwo= --00000000000027d35c058e5ae605-- From MAILER-DAEMON Tue Jul 23 12:57:21 2019 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hpy6L-0001Yz-57 for mharc-bug-xorriso@gnu.org; Tue, 23 Jul 2019 12:57:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41264) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpy6I-0001Ym-RK for bug-xorriso@gnu.org; Tue, 23 Jul 2019 12:57:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpy6H-00023k-Tw for bug-xorriso@gnu.org; Tue, 23 Jul 2019 12:57:18 -0400 Received: from mout.gmx.net ([212.227.15.18]:50847) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpy6H-0001oy-Hd for bug-xorriso@gnu.org; Tue, 23 Jul 2019 12:57:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563901029; bh=D04C4WP9OjgVjge00lMFgzutX7CoUdOZ4NUwO6+3reI=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=hkqrS/tFaZ1hl6cedAdod6ABR7LFtMRra6b+EL0qCSRQvwx9dOORwQXeASguQcLSE 3aAZ1rsCyl8JE8NR6SCVOE8khYXRjqieO1e3gUT6SphDLajEd+HuC31VZy1Qy3H1JC exVwamXaVjUjqvIqR885vNdw0hd5FiGiSF1sLZas= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([79.222.36.199]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MzyuS-1iau1L23eg-00x1kC; Tue, 23 Jul 2019 18:57:09 +0200 Date: Tue, 23 Jul 2019 18:56:15 +0200 From: "Thomas Schmitt" To: bug-xorriso@gnu.org Content-Type: text/plain; charset="utf-8" Cc: References: In-Reply-To: Message-Id: <15214697440019160331@scdbackup.webframe.org> X-Provags-ID: V03:K1:bDXf60kEN0TNi7PZLWlW6pNgfzOny1oe5pS3UtOih3FUSlbx4MY iur9td7/2U6CXCsKzoVeKZ9gIovkweCMMwSe5LaMuY8ciBrMOdLd/T02i5GPwonuiQoVdL7 qRxpCqgONFxuvfpPbkXvqbhf3YyXb0L4tUWzLkFZouLRPpc8AT8VWvfeBPYkyqBevf/RzyD yuWEJFGnksUvgmGaY4/fQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:QkMPdbOBkmU=:NLi87oaBtNysQEPYTC6we0 6tGvExKBTLb5td7L0Ugd0HF99/y45pE83D6GR6/66GWQ5GoAYj91H1RDv+gGnu+4xCzACY3oJ fc0tnPTYIrnQHQ/CbZS0BHUGyfYgjQ+X8a44PBUWQcTeGGwZ9PJ/ATWj0RYe7EjZt3qiwLi5E tUml3Fm87wAJU3cPNm/E1pJ/t69hEF0UiMEKhwo2iCaaOm2slU/zNCykIplC4LidyP3zgMYnZ egUj5Yoau4g1oRAqH5C3tF7W6I0gsVxvwLDRgOsvJ36hMqXp7M2Km2wlOciKSaDt3MueV6F6F 6Z0VKyI6ZGyGWWYqrqFAfRmhT81GqFg4OtgZxII0ydTVgPj3XNW7u5PjjMyh5XlnC+qmiuYm5 K9UBZl7DcOWQwQd3zS+dmckw0ZGSIERO4FgnZF02B6Uo1wsWn9Z9QIzKlT5cajGC7vPDIXqQq HwhuTydX3AFcH1RfInEOZ9P2ZRGEl/I5veQ9TnlsbYDLax2ajwPgE/wbU70oH9BrEgLvzFUxO nCGWfHu/EflBsJhjUjubzRroZyxwRt9+UgQSVw+OWnoee4BqML21Upx1SxNXqnv0G6XrsyLLn MsAEB6lw2qqUI00KNzKa2gtD/170ws1LANWHEtSaH2rQj2DjYNKKXjj9Jf3WstvBlu4AbXPtw LT1Q6qN+mZ4TtvC/jhKUs0vj8f7sdH/S0/J5rvsZDgI56rUNwPvmqkTuGKyFVm7VwZSiOvTQa WMxsRyYuJKa90QjiiXptZimZZB0HaJilP9mV809WI+UKzSknWcR9FPqdwezAm6ytb+2oO5AyL mg1Q8KVmG5Kwewf3SuhdpHblN0Hky5r5b0tyFJAixRbLOg4SPzqyr+sHXTy3XxgYVfTzhBZmB RqlVcL/Di29SoZ1qUf7iRCbrrchIAZ625nXr+f1crxVt5vecFzTJv0kA4G2nhi0YW23oA3aOf bEoGE6wrgHlAWd7pXuXmXOKgUoeI/UpGStcrNNjfJsNcgJltAm8vtwTZhpNksKdtW/J7YWdCD 28wMTn8IifEZ2Ha446kCUK8jx+8SAal5s4td/w3WVJCR7yXPLDt52ZtS+Y9ulnoby4KHVufh3 r0ZEN9l1rcV2uB/S2BuDhbsPRIzwSbdhl3m X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.18 Subject: Re: [Bug-xorriso] Crash in xorriso with fix X-BeenThere: bug-xorriso@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports and support requests for GNU xorriso List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Jul 2019 16:57:19 -0000 Hi, thanks for reporting. Obviously i never tested ACLs larger than 64 KB. -------------------------------------------------------------------------- --- a/xorriso/opts_p_z.c +++ b/xorriso/opts_p_z.c @@ -830,7 +830,7 @@ int Xorriso_option_session_log(struct XorrisO *xorriso, char *path, int flag) /* Option -setfacl_list alias -setfacl_listi */ int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag) { - int ret, eaten, line_size; + int ret, eaten, line_size, diff_buf_wpt; size_t buf_size= 0, buf_add= 64 * 1024, l, linecount= 0; char *line= NULL, *buf= NULL, *wpt, *new_buf, limit_text[80]; char *file_path= NULL, *uid= NULL, *gid= NULL; @@ -923,11 +923,13 @@ int Xorriso_option_setfacl_listi(struct XorrisO *xorriso, char *path, int flag) Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0); ret= 0; goto ex; } + diff_buf_wpt = wpt - buf; buf_size+= buf_add; new_buf= realloc(buf, buf_size); if(new_buf == NULL) goto out_of_mem; buf= new_buf; + wpt = buf + diff_buf_wpt; } memcpy(wpt, line, l); *(wpt + l)= '\n'; -------------------------------------------------------------------------- Looks good to me. I will test and then commit to git. The other issue might be the tip of the tail of a bigger problem. Normally the text formatting functions should avoid to create texts larger than xorriso->info_text. I will check whether Xorriso_normalize_acl_text() is supposed to produce printable text and if so, how to handle the situation. For now it looks like it was indeed just wrong to print that text naively. Have a nice day :) Thomas From MAILER-DAEMON Wed Jul 24 03:56:51 2019 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hqC8p-0005MB-2I for mharc-bug-xorriso@gnu.org; Wed, 24 Jul 2019 03:56:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51486) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqC8m-0005Db-NT for bug-xorriso@gnu.org; Wed, 24 Jul 2019 03:56:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqC8l-0006Xm-LC for bug-xorriso@gnu.org; Wed, 24 Jul 2019 03:56:48 -0400 Received: from mout.gmx.net ([212.227.17.22]:50677) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqC8l-0006Wv-7j for bug-xorriso@gnu.org; Wed, 24 Jul 2019 03:56:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1563955000; bh=+kXIBvmcqyuZblL6gnRUkHKgcwjfAgI2GNgHFDE/2zM=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=iXUv/y1TACNkVLZi3W6faDRc5J9XAqaOwoi39glZW1iDYtGlTKIAZOMhVxHZW0dPe wakVNGBQZr4sOhqjW0gipWJ4dcHS2aGDUTJ6/30gwcMBKQYa0CMF5v2w/ldRKGca1V m1lfezGEmCOtaW0lbBM/AmfVDxPEFTAtr8lKWmRM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([79.222.36.199]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MZOan-1i71XB3B9B-00LIZk; Wed, 24 Jul 2019 09:56:40 +0200 Date: Wed, 24 Jul 2019 09:55:48 +0200 From: "Thomas Schmitt" To: bug-xorriso@gnu.org Content-Type: text/plain; charset="utf-8" Cc: References: <15214697440019160331@scdbackup.webframe.org> In-Reply-To: <15214697440019160331@scdbackup.webframe.org> Message-Id: <3195369816428059153@scdbackup.webframe.org> X-Provags-ID: V03:K1:/VJirlP6ffWt8q7vmTcNZ7iYB35/UcWbm9D04WwaPxke9z5QC+2 iznlK4fzZifQxerp/+i6YQF2coP9EZnjB8bZlGG7fRd8RuANjRGzM+iHJCTIgWb6C7+Cuy8 iOkNsW0s9db4avo6lQez/wvj7pSVBVeB3r+DCuX9X8T0iJoPuuGnDwy4W69gOw3ROC33dIH VAPk60e3gwdEpkXHEpriA== X-UI-Out-Filterresults: notjunk:1;V03:K0:2H+K0bmciEQ=:j/D8Ecy+AsubM4a88iktjq 8+adcQ+66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oq Qm6oSlHGIc1cIxdqTgKzBXxH3MnuZ+kaJs8 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.22 Subject: Re: [Bug-xorriso] Crash in xorriso with fix X-BeenThere: bug-xorriso@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports and support requests for GNU xorriso List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jul 2019 07:56:49 -0000 Hi, the changes to prevent the SIGSEGV are now committed. https://dev.lovelyhq.com/libburnia/libisoburn/commit/321a0476fab929cdf0b7aa4157eeba249af992e7 I decided for some modifications of your patch: - The new variable diff_buf_wpt became size_t rather than int. - I made sure that the buffer enlargement is big enough to surely take the pending input line. (Was already so, but only implicitely.) - The new helper function went to xorriso/text_io.c and got a parameter by which the caller can curb the length to values smaller than sizeof(xorriso-info_text). (I deem a 40 KB debug message of few use.) The code of the function changed completely. Review is welcome. More problems popped up: - The test ACL text is not applicable because the user names are not known to the system and cannot be mapped to user ids. (Also the 10000 user lines were mis-formatted in respect to setfacl role:name:permissions syntax.) The error message from libisofs is too sparse libisofs: FAILURE : Error with encoding ACL for AAIP and needs to be improved. (And then i need a test text which really causes attribute setting of the file node.) - For some reason a few characters of the initially printed 40960 text characters of the debug message did not get printed. Both will be investigated in the next days. Have a nice day :) Thomas From MAILER-DAEMON Thu Jul 25 05:26:13 2019 Received: from list by lists.gnu.org with archive (Exim 4.86_2) id 1hqa0r-0002bw-Ao for mharc-bug-xorriso@gnu.org; Thu, 25 Jul 2019 05:26:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37592) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqa0p-0002bn-69 for bug-xorriso@gnu.org; Thu, 25 Jul 2019 05:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqa0o-0000B4-AB for bug-xorriso@gnu.org; Thu, 25 Jul 2019 05:26:11 -0400 Received: from mout.gmx.net ([212.227.15.15]:55839) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqa0n-0000AY-Qj for bug-xorriso@gnu.org; Thu, 25 Jul 2019 05:26:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1564046760; bh=EvxMpjO6UkzCSXZdnAb+xXDMce3LDPaIKVgS3mqLgN4=; h=X-UI-Sender-Class:Date:From:To:Subject:Cc:References:In-Reply-To; b=eNvBtcqeRGbOCkKsCTFDZinefjExDU+RPHNij0arjxh0UkfL96/LDzFnJ0YiK0VV3 1zFCsim7/6v1huoz5OasebyDAXHoghQ/TYXgaXCOsGl5hFEkcV7Eu1GXZj8S+R+3eD ZjQw7bzG+77CdROarrdYS0M82FQA1j4Fx2RtdVsM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from scdbackup.webframe.org ([79.222.36.199]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MhlKs-1iLUuu2iC8-00dnLe; Thu, 25 Jul 2019 11:26:00 +0200 Date: Thu, 25 Jul 2019 11:25:11 +0200 From: "Thomas Schmitt" To: bug-xorriso@gnu.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Cc: References: In-Reply-To: Message-Id: <3666698113611331125@scdbackup.webframe.org> X-Provags-ID: V03:K1:Pv69l5KEqRCvlMZfNkJsPy9ETi+WGXW0izDSfDB5Xf/jGRQaNjv SxZu6d65UFAuW9kEOYB0Mo3cLZgUCGE/riqu4xrz3iODcJ03niPVU09+IIDMFhqb7rtVANC mm4xIo8i27MlRs6W//HMgzZe1rm1m8cocEHOhbz1CZ4sPlHbFkPhrrpbIG8ZktTmSpwoQaU Winz7fFeoX+bnEuy8YECw== X-UI-Out-Filterresults: notjunk:1;V03:K0:w6/6f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wnrs0jp8FnwtOYqsZkB4YgGoksLnRhSZ2zEQNu7 VMjQXwURT4mWQEpr0ov0vFd8kd3ISLK2fuH X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.15 Subject: Re: [Bug-xorriso] Crash in xorriso with fix X-BeenThere: bug-xorriso@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports and support requests for GNU xorriso List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jul 2019 09:26:12 -0000 Hi, Eliska Svobodova wrote: > Sorry about test ACL, I haven't work with it > before and only focused on causing the segfault. Insofar your script was very successful. The following modified loop produces valid ACL entry texts for i in {1..10000}; do echo user:$i:rwx >> File_with_users; done These entries can be read by xorriso's -sefacl* commands, because like with setfacl(1) number texts are interpreted as uid numbers. (libisofs does this if the text is not found as user name. I am currently not aware what setfacl(1) would do if user "123" has uid 1000.) Processing time of the -setacl_list command is about 5 seconds on 3.5 GHz Xeon. So it looks like the effectivity of libisofs' ACL processing with large lists could be improved. I produced an ISO image with the generously sized ACL by valgrind --leak-check=3Dfull \ xorriso -for_backup \ -outdev test.iso \ -map . / \ -setfacl_list File_with_users and then inspected it sucessfully by xorriso -for_backup -indev test.iso -getfacl_r / -- 2>&1 | less But i did not dare to restore Test_file to my hard disk. Not a bit curious to learn about potential bugs in ext4. Command -for_backup implies -acl "on". Without that setting ACL are neithe= r stored, nor read-in, nor extracted by -osirrox "on" -extract / ./Text_dir_= X Have a nice day :) Thomas