<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.openanolis.cn/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.openanolis.cn/"
          
          maintainer="service@openanolis.org"
>

    <bug>
          <bug_id>2074</bug_id>
          
          <creation_ts>2022-09-06 14:23:15 +0000</creation_ts>
          <short_desc>There is an UAF vulnerability in vmwgfx driver</short_desc>
          <delta_ts>2023-01-11 13:47:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Anolis OS</classification>
          <product>Anolis OS 8</product>
          <component>kernel - anck-5.10</component>
          <version>8.6</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3-Medium</priority>
          <bug_severity>S3-normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ezrak1e">ezrakiez</reporter>
          <assigned_to name="xiangzao">xiangzao</assigned_to>
          <cc>shile.zhang</cc>
    
    
    <cc>steve.beattie</cc>
    
    
    <cc>xiangzao</cc>
    
    
    <cc>xlpang</cc>
          
          <qa_contact name="shuming">qingming.su</qa_contact>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7214</commentid>
    <comment_count>0</comment_count>
      <attachid>389</attachid>
    <who name="Ezrak1e">ezrakiez</who>
    <bug_when>2022-09-06 14:23:15 +0000</bug_when>
    <thetext>Created attachment 389
poc

Description of problem:

There is an UAF vulnerability in vmwgfx driver
Linux VMware guests have the device file /dev/dri/renderD128 (or Dxxx) which can be used to send ioctl()s to VMWare graphics driver, [vmwgfx] module. On some distributions this device is readable and writable by unprivileged users
Vulnerability location:
Drivers/gpu/vmxgfx/vmxgfx_execbuf.c
vmw_cmd_res_check


Vulnerable code:
res = vmw_user_resource_noref_lookup_handle
             (dev_priv, sw_context-&gt;fp-&gt;tfile, *id_loc, converter);

The returned resource object does not increment the reference count
This can cause race condition problems, which can cause UAF problems when the surface object is freed
Version-Release number of selected component (if applicable):
5.13.0-53


How reproducible:
In the linux environment of vmware, compile the poc file and execute
Steps to Reproduce:
gcc poc.c -o poc
./poc

Actual results:
DOS

Expected results:
DOS

=*=*=*=*=*=*=*=*=  Credit  =*=*=*=*=*=*=*=*=
ziming zhang(@ezrak1e) from Ant Group Light-Year Security Lab

Best Regards,
ziming</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>7934</commentid>
    <comment_count>1</comment_count>
    <who name="Shiloong">shile.zhang</who>
    <bug_when>2022-09-27 09:58:57 +0000</bug_when>
    <thetext>The content of attachment 389 has been deleted</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12350</commentid>
    <comment_count>2</comment_count>
    <who name="sbeattie">steve.beattie</who>
    <bug_when>2023-01-11 13:47:40 +0000</bug_when>
    <thetext>Hi, this issue was assigned CVE-2022-38457 (I&apos;m not the assigner, just a messenger). Has there been any progress on addressing this issue and/or has this issue been communicated to the upstream kernel developers?

Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="0"
              isprivate="0"
          >
            <attachid>389</attachid>
            <date>2022-09-06 14:23:15 +0000</date>
            <delta_ts>2022-09-06 14:23:15 +0000</delta_ts>
            <desc>poc</desc>
            <filename>poc.c</filename>
            <type>text/plain</type>
            <size>0</size>
            <attacher name="Ezrak1e">ezrakiez</attacher>
            
              <data encoding="base64"></data>

          </attachment>
      

    </bug>

</bugzilla>