{"id":"CVE-2022-50656","state":"PUBLISHED","title":"nfc: pn533: Clear nfc_target before being used","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: pn533: Clear nfc_target before being used\n\nFix a slab-out-of-bounds read that occurs in nla_put() called from\nnfc_genl_send_target() when target->sensb_res_len, which is duplicated\nfrom an nfc_target in pn533, is too large as the nfc_target is not\nproperly initialized and retains garbage values. Clear nfc_targets with\nmemset() before they are used.\n\nFound by a modified version of syzkaller.\n\nBUG: KASAN: slab-out-of-bounds in nla_put\nCall Trace:\n memcpy\n nla_put\n nfc_genl_dump_targets\n genl_lock_dumpit\n netlink_dump\n __netlink_dump_start\n genl_family_rcv_msg_dumpit\n genl_rcv_msg\n netlink_rcv_skb\n genl_rcv\n netlink_unicast\n netlink_sendmsg\n sock_sendmsg\n ____sys_sendmsg\n ___sys_sendmsg\n __sys_sendmsg\n do_syscall_64","publishedAt":"2025-12-09T00:00:31.691Z","updatedAt":"2026-08-05T08:59:15.998Z","severity":{"score":8.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"9da4a0411f3455e3885831d0758bee3e3d565bbc","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"61a7e15d55fae329a245535c3bac494e401005b8","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"bef2f478513e7367ef3b05441f6afca981de29be","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"8bddef54cbe9ede5ac7478f1e1e968fcfe7e6f03","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"aea9e64dec2cc6cd742e07ecd4e6236fc76b389b","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"aae9c24ebd901f482e6c88b6f9e0c80dc5b536d6","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"755019e37815a66bb0a23893debbd3dd640ccbd3","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"e491285b4d08884b622638be8e4961eb43b0af64","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"9f28157778ede0d4f183f7ab3b46995bb400abbe","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nfc/pn533/pn533.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"4.9.337","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.303","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.270","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.229","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.163","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.86","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nfc/pn533/pn533.c"]}],"references":["https://git.kernel.org/stable/c/9da4a0411f3455e3885831d0758bee3e3d565bbc","https://git.kernel.org/stable/c/61a7e15d55fae329a245535c3bac494e401005b8","https://git.kernel.org/stable/c/bef2f478513e7367ef3b05441f6afca981de29be","https://git.kernel.org/stable/c/8bddef54cbe9ede5ac7478f1e1e968fcfe7e6f03","https://git.kernel.org/stable/c/aea9e64dec2cc6cd742e07ecd4e6236fc76b389b","https://git.kernel.org/stable/c/aae9c24ebd901f482e6c88b6f9e0c80dc5b536d6","https://git.kernel.org/stable/c/755019e37815a66bb0a23893debbd3dd640ccbd3","https://git.kernel.org/stable/c/e491285b4d08884b622638be8e4961eb43b0af64","https://git.kernel.org/stable/c/9f28157778ede0d4f183f7ab3b46995bb400abbe"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50656.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50656","state":"PUBLISHED","datePublished":"2025-12-09T00:00:31.691Z","dateUpdated":"2026-08-05T08:59:15.998Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-08T23:57:43.372Z"},"containers":{"cna":{"title":"nfc: pn533: Clear nfc_target before being used","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nnfc: pn533: Clear nfc_target before being used\n\nFix a slab-out-of-bounds read that occurs in nla_put() called from\nnfc_genl_send_target() when target->sensb_res_len, which is duplicated\nfrom an nfc_target in pn533, is too large as the nfc_target is not\nproperly initialized and retains garbage values. Clear nfc_targets with\nmemset() before they are used.\n\nFound by a modified version of syzkaller.\n\nBUG: KASAN: slab-out-of-bounds in nla_put\nCall Trace:\n memcpy\n nla_put\n nfc_genl_dump_targets\n genl_lock_dumpit\n netlink_dump\n __netlink_dump_start\n genl_family_rcv_msg_dumpit\n genl_rcv_msg\n netlink_rcv_skb\n genl_rcv\n netlink_unicast\n netlink_sendmsg\n sock_sendmsg\n ____sys_sendmsg\n ___sys_sendmsg\n __sys_sendmsg\n do_syscall_64"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"9da4a0411f3455e3885831d0758bee3e3d565bbc","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"61a7e15d55fae329a245535c3bac494e401005b8","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"bef2f478513e7367ef3b05441f6afca981de29be","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"8bddef54cbe9ede5ac7478f1e1e968fcfe7e6f03","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"aea9e64dec2cc6cd742e07ecd4e6236fc76b389b","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"aae9c24ebd901f482e6c88b6f9e0c80dc5b536d6","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"755019e37815a66bb0a23893debbd3dd640ccbd3","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"e491285b4d08884b622638be8e4961eb43b0af64","versionType":"git"},{"version":"361f3cb7f9cfdb82c80926d0e7843c098c034545","status":"affected","lessThan":"9f28157778ede0d4f183f7ab3b46995bb400abbe","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nfc/pn533/pn533.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.3","versionType":"semver"},{"version":"4.9.337","status":"unaffected","lessThanOrEqual":"4.9.*","versionType":"semver"},{"version":"4.14.303","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.270","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.229","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.163","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.86","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.0.16","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1.2","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/nfc/pn533/pn533.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/9da4a0411f3455e3885831d0758bee3e3d565bbc"},{"url":"https://git.kernel.org/stable/c/61a7e15d55fae329a245535c3bac494e401005b8"},{"url":"https://git.kernel.org/stable/c/bef2f478513e7367ef3b05441f6afca981de29be"},{"url":"https://git.kernel.org/stable/c/8bddef54cbe9ede5ac7478f1e1e968fcfe7e6f03"},{"url":"https://git.kernel.org/stable/c/aea9e64dec2cc6cd742e07ecd4e6236fc76b389b"},{"url":"https://git.kernel.org/stable/c/aae9c24ebd901f482e6c88b6f9e0c80dc5b536d6"},{"url":"https://git.kernel.org/stable/c/755019e37815a66bb0a23893debbd3dd640ccbd3"},{"url":"https://git.kernel.org/stable/c/e491285b4d08884b622638be8e4961eb43b0af64"},{"url":"https://git.kernel.org/stable/c/9f28157778ede0d4f183f7ab3b46995bb400abbe"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H","baseScore":8.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:A - The bug is triggered when a PN533 reader completes NFC-DEP JumpDep against a peer in RF range (poll_dep or dep_link_up), so exploitation is via the NFC adjacent segment, consistent with other NFC/Bluetooth protocol bugs.\nAC:L - Once the reader is polling for NFC-DEP, a peer that successfully answers JumpDep reliably creates the poisoned target and a subsequent target dump reliably exercises the OOB read; no attacker-uncontrollable race or rare config is required.\nPR:N - An adjacent NFC peer needs no host credentials; START_POLL/DEV_UP are performed by the system's NFC stack, while NFC_CMD_GET_TARGET itself has no GENL_ADMIN_PERM, so the attacker requires no privileges.\nUI:N - No victim user action is required beyond normal NFC operation; a polling reader plus an in-range DEP peer and an automatic or local target dump are sufficient.\nS:U - Impact is confined to the host kernel's memory confidentiality and availability; there is no VM escape, IOMMU bypass, or other cross-authority boundary crossing.\nC:H - Garbage sensb_res_len/sensf_res_len/nfcid2_len (u8, up to 255) drive nla_put() to copy far past the 76-byte kmemdup'd nfc_target into adjacent slab memory and return it to userspace over netlink, enabling a substantial kernel heap info leak.\nI:N - The defect is an out-of-bounds read during netlink serialization only; lengths are never used for writes, so there is no memory corruption write primitive or integrity impact.\nA:H - A large slab OOB read past the allocated nfc_target can touch unmapped memory beyond the slab object/page and cause a kernel oops, matching KASAN's slab-out-of-bounds report on the dump path."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:59:15.998Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"4.9.337"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"4.14.303"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"4.19.270"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.4.229"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.10.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"5.15.86"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.0.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.1.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.3","versionEndExcluding":"6.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}