CVE-2025-38263 in Linux정보

요약

\~에 의해 VulDB • 2026. 05. 31.

리눅스 커널에서 다음 취약점이 해결되었습니다:

bcache: cache_set_flush()에서 NULL 포인터 오류 수정

1. LINE#1794 - LINE#1887은 bch_cache_set_alloc() 함수와 관련된 코드입니다. 2. LINE#2078 - LINE#2142는 register_cache_set() 함수와 관련된 코드입니다. 3. register_cache_set()은 LINE#2098에서 bch_cache_set_alloc()을 호출합니다.

1794 struct cache_set *bch_cache_set_alloc(struct bcache_device *d, 1795 struct cache_sb *sb, 1796 struct cache_sb *parent_sb, 1797 struct cache_set *parent, 1798 struct cache_set *next) 1799 {
... 1860 c->cache = kcalloc(c->nr_caches, sizeof(struct cache *), 1861 GFP_KERNEL); 1862 if (!c->cache) {
1863 pr_err("cannot allocate memory for cache array\n"); 1864 err = -ENOMEM; 1865 goto err; 1866 } ... 1875 err: 1876 if (c->cache) 1877 kfree(c->cache); 1878 if (c->cache_devs) 1879 kfree(c->cache_devs); 1880 if (c->cache) 1881 kfree(c->cache); 1882 if (c->cache_devs) 1883 kfree(c->cache_devs); 1884 if (c->cache) 1885 bch_cache_set_unregister(c); 1886 return NULL; 1887 }

2078 static int register_cache_set(struct cache_set *c) 2079 {
... 2098 c = bch_cache_set_alloc(d, &sb, &parent_sb, NULL, NULL); 2099 if (!c) 2100 return -ENOMEM; ... 2128 c->cache[i] = ca;
2129 c->nr_caches++; ... 2142 }

(1) LINE#1860 - LINE#1874가 참이면, 'goto err'(LINE#1875)로 이동하고 bch_cache_set_unregister()(LINE#1885)를 호출합니다. (2) (1)로 인해 NULL(LINE#1886)을 반환하므로, LINE#2098 - LINE#2100에서 반환합니다. (3) (2)로 인해 반환되었으므로, LINE#2128 - LINE#2129는 c->cache[]에 값을 할당하지
않습니다. 즉, c->cache[]는 NULL입니다.

LINE#1624 - LINE#1665는 cache_set_flush() 함수의 일부 코드입니다. (1)에 따라, LINE#1885에서 bch_cache_set_unregister() ---> bch_cache_set_stop() ---> closure_queue() -.-> cache_set_flush() (아래 LINE#1624 참조)

1624 static void cache_set_flush(struct closure *cl) 1625 {
... 1654 for_each_cache(ca, c, i) 1655 if (ca->alloc_thread) ^^ 1656 kthread_stop(ca->alloc_thread); ... 1665 }

(4) LINE#1655에서 ca는 cache_set_flush()에서 NULL입니다(참조 (3)). 따라서 아래 커널 크래시가 발생했습니다: [ 846.712887] bcache: register_cache() error drbd6: cannot allocate memory
[ 846.713242] bcache: register_bcache() error : failed to register device
[ 846.713336] bcache: cache_set_free() Cache set 2f84bdc1-498a-4f2f-98a7-01946bf54287 unregistered
[ 846.713768] BUG: unable to handle kernel NULL pointer dereference at 00000000000009f8
[ 846.714790] PGD 0 P4D 0
[ 846.715129] Oops: 0000 [#1] SMP PTI
[ 846.715475

VulDB is the best source for vulnerability data and more expert information about this specific topic.

책임이 있는

Linux

예약하다

2025. 04. 16.

모더레이션

수락

항목

VDB-315782

EPSS

0.00147

출처

Do you need the next level of professionalism?

Upgrade your account now!