{"id":"CVE-2022-50885","summary":"RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed\n\nThere is a null-ptr-deref when mount.cifs over rdma:\n\n  BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe]\n  Read of size 8 at addr 0000000000000018 by task mount.cifs/3046\n\n  CPU: 2 PID: 3046 Comm: mount.cifs Not tainted 6.1.0-rc5+ #62\n  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc3\n  Call Trace:\n   \u003cTASK\u003e\n   dump_stack_lvl+0x34/0x44\n   kasan_report+0xad/0x130\n   rxe_qp_do_cleanup+0x2f3/0x360 [rdma_rxe]\n   execute_in_process_context+0x25/0x90\n   __rxe_cleanup+0x101/0x1d0 [rdma_rxe]\n   rxe_create_qp+0x16a/0x180 [rdma_rxe]\n   create_qp.part.0+0x27d/0x340\n   ib_create_qp_kernel+0x73/0x160\n   rdma_create_qp+0x100/0x230\n   _smbd_get_connection+0x752/0x20f0\n   smbd_get_connection+0x21/0x40\n   cifs_get_tcp_session+0x8ef/0xda0\n   mount_get_conns+0x60/0x750\n   cifs_mount+0x103/0xd00\n   cifs_smb3_do_mount+0x1dd/0xcb0\n   smb3_get_tree+0x1d5/0x300\n   vfs_get_tree+0x41/0xf0\n   path_mount+0x9b3/0xdd0\n   __x64_sys_mount+0x190/0x1d0\n   do_syscall_64+0x35/0x80\n   entry_SYSCALL_64_after_hwframe+0x46/0xb0\n\nThe root cause of the issue is the socket create failed in\nrxe_qp_init_req().\n\nSo move the reset rxe_qp_do_cleanup() after the NULL ptr check.","modified":"2026-04-02T08:28:49.143090Z","published":"2025-12-30T12:34:12.093Z","related":["SUSE-SU-2026:0263-1","SUSE-SU-2026:0317-1","SUSE-SU-2026:0411-1","SUSE-SU-2026:0473-1","SUSE-SU-2026:0617-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50885.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5b924632d84a60bc0c7fe6e9bbbce99d03908957"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6bb5a62bfd624039b05157745c234068508393a9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7340ca9f782be6fbe3f64a134dc112772764f766"},{"type":"WEB","url":"https://git.kernel.org/stable/c/821f9a18210f6b9fd6792471714c799607b25db4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/bd7106a6004f1077a365ca7f5a99c7a708e20714"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ee24de095569935eba600f7735e8e8ddea5b418e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f64f08b9e6fb305a25dd75329e06ae342b9ce336"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f67376d801499f4fa0838c18c1efcad8840e550d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50885.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50885"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"8700e3e7c4857d28ebaa824509934556da0b3e76"},{"fixed":"ee24de095569935eba600f7735e8e8ddea5b418e"},{"fixed":"7340ca9f782be6fbe3f64a134dc112772764f766"},{"fixed":"bd7106a6004f1077a365ca7f5a99c7a708e20714"},{"fixed":"6bb5a62bfd624039b05157745c234068508393a9"},{"fixed":"f64f08b9e6fb305a25dd75329e06ae342b9ce336"},{"fixed":"5b924632d84a60bc0c7fe6e9bbbce99d03908957"},{"fixed":"821f9a18210f6b9fd6792471714c799607b25db4"},{"fixed":"f67376d801499f4fa0838c18c1efcad8840e550d"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50885.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.8.0"},{"fixed":"4.14.303"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.15.0"},{"fixed":"4.19.270"}]},{"type":"ECOSYSTEM","events":[{"introduced":"4.20.0"},{"fixed":"5.4.229"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.163"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.86"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.0.16"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50885.json"}}],"schema_version":"1.7.5"}