1. 13 7月, 2023 1 次提交
  2. 12 7月, 2023 3 次提交
  3. 11 7月, 2023 3 次提交
    • Z
      jbd2: Check 'jh->b_transaction' before remove it from checkpoint · a49943e0
      Zhihao Cheng 提交于
      hulk inclusion
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I70WHL
      CVE: NA
      
      --------------------------------
      
      Following process will corrupt ext4 image:
      Step 1:
      jbd2_journal_commit_transaction
       __jbd2_journal_insert_checkpoint(jh, commit_transaction)
       // Put jh into trans1->t_checkpoint_list
       journal->j_checkpoint_transactions = commit_transaction
       // Put trans1 into journal->j_checkpoint_transactions
      
      Step 2:
      do_get_write_access
       test_clear_buffer_dirty(bh) // clear buffer dirty,set jbd dirty
       __jbd2_journal_file_buffer(jh, transaction) // jh belongs to trans2
      
      Step 3:
      drop_cache
       journal_shrink_one_cp_list
        jbd2_journal_try_remove_checkpoint
         if (!trylock_buffer(bh))  // lock bh, true
         if (buffer_dirty(bh))     // buffer is not dirty
         __jbd2_journal_remove_checkpoint(jh)
         // remove jh from trans1->t_checkpoint_list
      
      Step 4:
      jbd2_log_do_checkpoint
       trans1 = journal->j_checkpoint_transactions
       // jh is not in trans1->t_checkpoint_list
       jbd2_cleanup_journal_tail(journal)  // trans1 is done
      
      Step 5: Power cut, trans2 is not committed, jh is lost in next mounting.
      
      Fix it by checking 'jh->b_transaction' before remove it from checkpoint.
      
      Fixes: 80079353 ("jbd2: fix a race when checking checkpoint ...")
      Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
      (cherry picked from commit 7723e91d)
      a49943e0
    • L
      etmem: fix the div 0 problem in swapcache reclaim process · 248e7033
      liubo 提交于
      euleros inclusion
      category: bugfix
      bugzilla: https://gitee.com/openeuler/kernel/issues/I7JI6K
      CVE: NA
      
      ------------------------------------------------------------
      
      In the swapcache recycling process, the number of pages
      to be reclaimed on each node is obtained as follows:
      
      nr_to_reclaim[nid_num] = (swapcache_to_reclaim /
      			  (swapcache_total_reclaimable / nr[nid_num]));
      
      However, nr[nid_num] is obtained by traversing the number
      of swapcache pages on each node.
      If there are multiple nodes in the environment and
      no swap process occurs on a node, no swapcache page exists.
      The value of nr[nid_num] may be 0.
      
      Therefore, division by zero errors may occur.
      Signed-off-by: Nliubo <liubo254@huawei.com>
      248e7033
    • O
      !1361 fix CVE-2023-1295 · cb31b5b2
      openeuler-ci-bot 提交于
      Merge Pull Request from: @LiuYongQiang0816 
       
      3 patches from Li Nan 
       
      Link:https://gitee.com/openeuler/kernel/pulls/1361 
      
      Reviewed-by: Zhang Changzhong <zhangchangzhong@huawei.com> 
      Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com> 
      cb31b5b2
  4. 10 7月, 2023 3 次提交
  5. 08 7月, 2023 4 次提交
  6. 07 7月, 2023 26 次提交