{"id":"AZL-118229","summary":"CVE-2026-143160 affecting package kernel 6.6.161.1-1","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet/smc: fix lgr/lnk lifetime vs diag reader race\n\nThe diag dump walks the socket hash table under a read_lock and\ndereferences conn-\u003elgr and conn-\u003elnk. Several paths expose a window\nwhere a hashed socket has freed or partially freed conn/lgr/lnk state.\n\nFirst, smc_conn_abort() calls smc_conn_free() during early handshake\naborts while the socket is still hashed in SMC_INIT, synchronously\nfreeing the lgr on the smc_lgr_cleanup_early() path without holding the\nhash write_lock. A concurrent diag reader can load a non-NULL conn-\u003elgr\nand dereference it after the kfree. Skip the connection, link group and\nDMB attributes in __smc_diag_dump() for sockets in SMC_INIT or\nSMC_CLOSED or fallen back to TCP, and take diag_mode from an is_smcd\nflag cached at connection creation.\n\nThe state filter alone does not close the race. A connection aborted by\na failed handshake can keep its alert token, because smc_conn_free()\nskips the unregister when smc_lgr_terminate_sched() has emptied\nlgr-\u003elist; close_work may also have been queued before the abort, as the\nCDC receive path is not excluded by the handshake's socket lock.\nsmc_close_passive_work() would then move the hashed socket from SMC_INIT\nto SMC_APPCLOSEWAIT1 or SMC_PROCESSABORT, states the filter does not\ncover, and later run a passive-closing sock_put() that\nsmc_connect_decline_fallback() dropped already. Return early from\nsmc_close_passive_work() when the connection was freed; the check holds\nthe socket lock that every smc_conn_free() caller holds as well, so a\nhashed socket with a freed connection stays in SMC_INIT or SMC_CLOSED\nuntil release.\n\nThis changes the sock_diag output for such sockets: the connection, link\ngroup and DMB attributes are omitted, which smcss does not read for\nsockets in these states, while SMC_DIAG_FALLBACK is still reported and\nan SMC-D socket in SMC_INIT or SMC_CLOSED still reports\nSMC_DIAG_MODE_SMCD from the cached flag. A fallback socket is a plain\nTCP socket with no SMC connection state to report; the stale conn fields\nleft behind by smc_conn_abort() must not be read.\n\nSecond, in smc_conn_kill() on SMC-D with dmb_nocopy, smcd_buf_detach()\nNULLs and frees conn-\u003esndbuf_desc while the socket is still hashed. A\nconcurrent diag reader entering the CONNINFO block can dereference the\nfreed descriptor. Unhash the socket right before smcd_buf_detach(). As a\nresult, killed ACTIVE and APPCLOSEWAIT sockets that are still open are\nno longer visible to smcss on loopback-ism devices.\n\nThird, in the terminal teardown branches of smc_close_active_abort()\n(PEERCLOSEWAIT and PROCESSABORT groups) and in smc_close_passive_work(),\nsmc_conn_free() drops lgr and lnk references while the socket is still\nhashed. Unhash immediately before each smc_conn_free() call at those\nsites. Sockets killed in those close states are therefore unhashed, and\ntheir inuse accounting dropped, before close(), even if the fd is still\nopen.\n\nFourth, use smp_load_acquire() / smp_store_release() on sk_state to\norder these checks on weakly ordered CPUs. A reader that observes\nSMC_ACTIVE is guaranteed to see the connection setup that preceded the\nstore; a reader that observes SMC_CLOSED from smc_listen_out_err() skips\nthe connection fields in any case, so that particular store is hardening\nkept for uniformity, not a required ordering.\n\nAdditionally, in __smc_diag_dump(), use the cached link-\u003eibname instead\nof link-\u003esmcibdev-\u003eibdev-\u003ename, avoiding a NULL pointer dereference or\nuse-after-free of the IB device when __smcr_link_clear() zeroes the link\nduring concurrent SMC-R link failover. The link data is still read\nwithout conns_lock or send_lock, so a dump racing a failover may\ntransiently report zeroed or mixed link fields; this does not affect\nmemory safety and the next dump reports the new link. Like the SMC\nnetlink link dump and the tracepoints, the name is the one cached at\nlink creation time.","modified":"2026-12-04T14:18:39.989170888Z","published":"2026-12-03T10:17:51Z","upstream":["CVE-2026-143160"],"references":[{"type":"WEB","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143160"}],"affected":[{"package":{"name":"kernel","ecosystem":"Azure Linux:3","purl":"pkg:rpm/azure-linux/kernel"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"6.6.161.1-1"}]}],"database_specific":{"source":"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-118229.json"}}],"schema_version":"1.9.2"}