1. 01 Jul, 2022 7 commits
    • Oleksandr Tyshchenko's avatar
      xen/arm: Fix race in RB-tree based P2M accounting · b75cd218
      Oleksandr Tyshchenko authored
      During the PV driver life cycle the mappings are added to
      the RB-tree by set_foreign_p2m_mapping(), which is called from
      gnttab_map_refs() and are removed by clear_foreign_p2m_mapping()
      which is called from gnttab_unmap_refs(). As both functions end
      up calling __set_phys_to_machine_multi() which updates the RB-tree,
      this function can be called concurrently.
      
      There is already a "p2m_lock" to protect against concurrent accesses,
      but the problem is that the first read of "phys_to_mach.rb_node"
      in __set_phys_to_machine_multi() is not covered by it, so this might
      lead to the incorrect mappings update (removing in our case) in RB-tree.
      
      In my environment the related issue happens rarely and only when
      PV net backend is running, the xen_add_phys_to_mach_entry() claims
      that it cannot add new pfn <-> mfn mapping to the tree since it is
      already exists which results in a failure when mapping foreign pages.
      
      But there might be other bad consequences related to the non-protected
      root reads such use-after-free, etc.
      
      While at it, also fix the similar usage in __pfn_to_mfn(), so
      initialize "struct rb_node *n" with the "p2m_lock" held in both
      functions to avoid possible bad consequences.
      
      This is CVE-2022-33744 / XSA-406.
      Signed-off-by: default avatarOleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
      Reviewed-by: default avatarStefano Stabellini <sstabellini@kernel.org>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      b75cd218
    • Jan Beulich's avatar
      xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() · f63c2c20
      Jan Beulich authored
      The commit referenced below moved the invocation past the "next" label,
      without any explanation. In fact this allows misbehaving backends undue
      control over the domain the frontend runs in, as earlier detected errors
      require the skb to not be freed (it may be retained for later processing
      via xennet_move_rx_slot(), or it may simply be unsafe to have it freed).
      
      This is CVE-2022-33743 / XSA-405.
      
      Fixes: 6c5aa6fc ("xen networking: add basic XDP support for xen-netfront")
      Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      f63c2c20
    • Roger Pau Monne's avatar
      xen/blkfront: force data bouncing when backend is untrusted · 2400617d
      Roger Pau Monne authored
      Split the current bounce buffering logic used with persistent grants
      into it's own option, and allow enabling it independently of
      persistent grants.  This allows to reuse the same code paths to
      perform the bounce buffering required to avoid leaking contiguous data
      in shared pages not part of the request fragments.
      
      Reporting whether the backend is to be trusted can be done using a
      module parameter, or from the xenstore frontend path as set by the
      toolstack when adding the device.
      
      This is CVE-2022-33742, part of XSA-403.
      Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      2400617d
    • Roger Pau Monne's avatar
      xen/netfront: force data bouncing when backend is untrusted · 4491001c
      Roger Pau Monne authored
      Bounce all data on the skbs to be transmitted into zeroed pages if the
      backend is untrusted. This avoids leaking data present in the pages
      shared with the backend but not part of the skb fragments.  This
      requires introducing a new helper in order to allocate skbs with a
      size multiple of XEN_PAGE_SIZE so we don't leak contiguous data on the
      granted pages.
      
      Reporting whether the backend is to be trusted can be done using a
      module parameter, or from the xenstore frontend path as set by the
      toolstack when adding the device.
      
      This is CVE-2022-33741, part of XSA-403.
      Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      4491001c
    • Roger Pau Monne's avatar
      xen/netfront: fix leaking data in shared pages · 307c8de2
      Roger Pau Monne authored
      When allocating pages to be used for shared communication with the
      backend always zero them, this avoids leaking unintended data present
      on the pages.
      
      This is CVE-2022-33740, part of XSA-403.
      Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      307c8de2
    • Roger Pau Monne's avatar
      xen/blkfront: fix leaking data in shared pages · 2f446ffe
      Roger Pau Monne authored
      When allocating pages to be used for shared communication with the
      backend always zero them, this avoids leaking unintended data present
      on the pages.
      
      This is CVE-2022-26365, part of XSA-403.
      Signed-off-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
      Reviewed-by: default avatarJan Beulich <jbeulich@suse.com>
      Reviewed-by: default avatarJuergen Gross <jgross@suse.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      2f446ffe
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-07-01' of git://anongit.freedesktop.org/drm/drm · a175eca0
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Bit quieter this week, the main thing is it pulls in the fixes for the
        sysfb resource issue you were seeing. these had been queued for next
        so should have had some decent testing.
      
        Otherwise amdgpu, i915 and msm each have a few fixes, and vc4 has one.
      
        fbdev:
         - sysfb fixes/conflicting fb fixes
      
        amdgpu:
         - GPU recovery fix
      
         - Fix integer type usage in fourcc header for AMD modifiers
      
         - KFD TLB flush fix for gfx9 APUs
      
         - Display fix
      
        i915:
         - Fix ioctl argument error return
      
         - Fix d3cold disable to allow PCI upstream bridge D3 transition
      
         - Fix setting cache_dirty for dma-buf objects on discrete
      
        msm:
         - Fix to increment vsync_cnt before calling drm_crtc_handle_vblank so
           that userspace sees the value *after* it is incremented if waiting
           for vblank events
      
         - Fix to reset drm_dev to NULL in dp_display_unbind to avoid a crash
           in probe/bind error paths
      
         - Fix to resolve the smatch error of de-referencing before NULL check
           in dpu_encoder_phys_wb.c
      
         - Fix error return to userspace if fence-id allocation fails in
           submit ioctl
      
        vc4:
         - NULL ptr dereference fix"
      
      * tag 'drm-fixes-2022-07-01' of git://anongit.freedesktop.org/drm/drm:
        Revert "drm/amdgpu/display: set vblank_disable_immediate for DC"
        drm/amdgpu: To flush tlb for MMHUB of RAVEN series
        drm/fourcc: fix integer type usage in uapi header
        drm/amdgpu: fix adev variable used in amdgpu_device_gpu_recover()
        fbdev: Disable sysfb device registration when removing conflicting FBs
        firmware: sysfb: Add sysfb_disable() helper function
        firmware: sysfb: Make sysfb_create_simplefb() return a pdev pointer
        drm/msm/gem: Fix error return on fence id alloc fail
        drm/i915: tweak the ordering in cpu_write_needs_clflush
        drm/i915/dgfx: Disable d3cold at gfx root port
        drm/i915/gem: add missing else
        drm/vc4: perfmon: Fix variable dereferenced before check
        drm/msm/dpu: Fix variable dereferenced before check
        drm/msm/dp: reset drm_dev to NULL at dp_display_unbind()
        drm/msm/dpu: Increment vsync_cnt before waking up userspace
      a175eca0
  2. 30 Jun, 2022 23 commits
  3. 29 Jun, 2022 10 commits