aboutsummaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2024-01-19 20:49:34 +0000
committerDavid Howells <[email protected]>2024-01-22 22:25:15 +0000
commitc3d6569a43322f371e7ba0ad386112723757ac8f (patch)
treea5e95c94000f9ddd3c19dc9fd8db9214e095022f /scripts/generate_rust_analyzer.py
parent843609df0be792991b3c4a720d6be4828d48dec4 (diff)
cachefiles, erofs: Fix NULL deref in when cachefiles is not doing ondemand-mode
cachefiles_ondemand_init_object() as called from cachefiles_open_file() and cachefiles_create_tmpfile() does not check if object->ondemand is set before dereferencing it, leading to an oops something like: RIP: 0010:cachefiles_ondemand_init_object+0x9/0x41 ... Call Trace: <TASK> cachefiles_open_file+0xc9/0x187 cachefiles_lookup_cookie+0x122/0x2be fscache_cookie_state_machine+0xbe/0x32b fscache_cookie_worker+0x1f/0x2d process_one_work+0x136/0x208 process_scheduled_works+0x3a/0x41 worker_thread+0x1a2/0x1f6 kthread+0xca/0xd2 ret_from_fork+0x21/0x33 Fix this by making cachefiles_ondemand_init_object() return immediately if cachefiles->ondemand is NULL. Fixes: 3c5ecfe16e76 ("cachefiles: extract ondemand info field from cachefiles_object") Reported-by: Marc Dionne <[email protected]> Signed-off-by: David Howells <[email protected]> cc: Gao Xiang <[email protected]> cc: Chao Yu <[email protected]> cc: Yue Hu <[email protected]> cc: Jeffle Xu <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected]
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions