Skip to content

wifi: vwifi: prevent NULL pointer dereference of vif->ap in virtio mode#94

Open
ga13234624 wants to merge 1 commit into
sysprog21:mainfrom
ga13234624:fix-vwifi-ap-null-guard
Open

wifi: vwifi: prevent NULL pointer dereference of vif->ap in virtio mode#94
ga13234624 wants to merge 1 commit into
sysprog21:mainfrom
ga13234624:fix-vwifi-ap-null-guard

Conversation

@ga13234624

Copy link
Copy Markdown

The bss_param configuration reads BSS parameters (beacon interval, DTIM, short preamble) from the local AP object via vif->ap.

While vif->ap is valid in non-virtio mode where the AP is another local vwifi_vif, it is legitimately NULL in virtio mode because the AP resides in a different VM. Attempting to access it blindly leads to a NULL pointer dereference.

Fix this by checking if vif->ap is NULL and skipping the bss_param setup accordingly when operating in virtio mode.

The bss_param configuration reads BSS parameters (beacon interval, DTIM,
short preamble) from the local AP object via vif->ap.

While vif->ap is valid in non-virtio mode where the AP is another local
vwifi_vif, it is legitimately NULL in virtio mode because the AP resides
in a different VM. Attempting to access it blindly leads to a NULL
pointer dereference.

Fix this by checking if vif->ap is NULL and skipping the bss_param
setup accordingly when operating in virtio mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant