<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>41283</bug_id>
          
          <creation_ts>2021-11-03 13:41:54 +0300</creation_ts>
          <short_desc>kernel.userns_restrict regression</short_desc>
          <delta_ts>2021-11-11 14:52:07 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>kernel-image-std-def</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry V. Levin">ldv</reporter>
          <assigned_to name="Vitaly Chikunov">vt</assigned_to>
          <cc>andy</cc>
    
    <cc>kernelbot</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>204473</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-11-03 13:41:54 +0300</bug_when>
    <thetext>kernel.userns_restrict default changed silently from 1 to 0, making the system open to all kinds of userns attacks by unprivileged users.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204476</commentid>
    <comment_count>1</comment_count>
    <who name="Gleb F-Malinovskiy">glebfm</who>
    <bug_when>2021-11-03 13:47:10 +0300</bug_when>
    <thetext>(In reply to Dmitry V. Levin from comment #0)
&gt; kernel.userns_restrict default changed silently from 1 to 0, making the
&gt; system open to all kinds of userns attacks by unprivileged users.

It changed for std-def kernel during 5.4 -&gt; 5.10 update, for un-def 5.7 -&gt; 5.8.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204595</commentid>
    <comment_count>2</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2021-11-09 10:06:09 +0300</bug_when>
    <thetext>Ooops...
To be fixed today</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204597</commentid>
    <comment_count>3</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2021-11-09 10:12:51 +0300</bug_when>
    <thetext>it was a fault using git rebase. I&apos;ve reprodused it :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204637</commentid>
    <comment_count>4</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2021-11-09 19:02:41 +0300</bug_when>
    <thetext>kernel-image-std-def-2:5.10.78-alt2 -&gt; sisyphus:

 Tue Nov 09 2021 Kernel Bot &lt;kernelbot@altlinux&gt; 2:5.10.78-alt2
 - CLONE_USERNS default restriction restored (Closes: 41283)
 - NVME fix for TF307-MB-S-D (Closes: 40718)
 - use VIRT_CPU_ACCOUNTING_NATIVE instead of TICK_CPU_ACCOUNTING</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204641</commentid>
    <comment_count>5</comment_count>
    <who name="Andrew Vasilyev">andy</who>
    <bug_when>2021-11-09 22:25:54 +0300</bug_when>
    <thetext>  А в un-def не нужно?

andy@andy:((kernel-image-un-def-5.14.17-alt1-0-g03720ea10a8a))$ gg sysctl_userns_restrict
...
kernel/user_namespace.c:int sysctl_userns_restrict __read_mostly;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204652</commentid>
    <comment_count>6</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2021-11-10 11:31:21 +0300</bug_when>
    <thetext>(Ответ для Andrew Vasilyev на комментарий #5)
&gt;   А в un-def не нужно?
&gt; 
&gt; andy@andy:((kernel-image-un-def-5.14.17-alt1-0-g03720ea10a8a))$ gg
&gt; sysctl_userns_restrict
&gt; ...
&gt; kernel/user_namespace.c:int sysctl_userns_restrict __read_mostly;

Конечно, нужно. В git я уже поменял, но хотел дождаться сборки std-def и определённости -- помогла ли эта сборка с проблемами учёта времени (это не связанная проблема, но исправлялась той же сборкой).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204723</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2021-11-11 03:04:00 +0300</bug_when>
    <thetext>(In reply to Repository Robot from comment #4)
&gt; kernel-image-std-def-2:5.10.78-alt2 -&gt; sisyphus:
&gt; 
&gt;  Tue Nov 09 2021 Kernel Bot &lt;kernelbot@altlinux&gt; 2:5.10.78-alt2
&gt;  - CLONE_USERNS default restriction restored (Closes: 41283)
&gt;  - NVME fix for TF307-MB-S-D (Closes: 40718)
&gt;  - use VIRT_CPU_ACCOUNTING_NATIVE instead of TICK_CPU_ACCOUNTING

Попытка заменить TICK_CPU_ACCOUNTING на что-нибудь приличное не нашла отражение в /proc/config.gz:
-# Linux/x86_64 5.10.76-std-def-alt1 Kernel Configuration
+# Linux/x86_64 5.10.78-std-def-alt2 Kernel Configuration

Видимо, VIRT_CPU_ACCOUNTING_NATIVE на x86_64 нет, и это делается как-то иначе.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>204745</commentid>
    <comment_count>8</comment_count>
    <who name="Anton V. Boyarshinov">boyarsh</who>
    <bug_when>2021-11-11 14:52:07 +0300</bug_when>
    <thetext>(Ответ для Dmitry V. Levin на комментарий #7)
&gt; (In reply to Repository Robot from comment #4)
&gt; &gt; kernel-image-std-def-2:5.10.78-alt2 -&gt; sisyphus:
&gt; &gt; 
&gt; &gt;  Tue Nov 09 2021 Kernel Bot &lt;kernelbot@altlinux&gt; 2:5.10.78-alt2
&gt; &gt;  - CLONE_USERNS default restriction restored (Closes: 41283)
&gt; &gt;  - NVME fix for TF307-MB-S-D (Closes: 40718)
&gt; &gt;  - use VIRT_CPU_ACCOUNTING_NATIVE instead of TICK_CPU_ACCOUNTING
&gt; 
&gt; Попытка заменить TICK_CPU_ACCOUNTING на что-нибудь приличное не нашла
&gt; отражение в /proc/config.gz:
&gt; -# Linux/x86_64 5.10.76-std-def-alt1 Kernel Configuration
&gt; +# Linux/x86_64 5.10.78-std-def-alt2 Kernel Configuration
&gt; 
&gt; Видимо, VIRT_CPU_ACCOUNTING_NATIVE на x86_64 нет, и это делается как-то
&gt; иначе.

Ок, буду копать дальше, но, видимо это не в этой баге...</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>