Ticket #1002 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Wrong buffer size in has_phy_80211_subdir()

Reported by: jhrozek Owned by: jhrozek
Priority: major Milestone: SSSD 1.7.0
Component: Service Monitor Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:
Sensitive: Tests Updated: no
Coverity Bug: 11031 Patch Submitted: yes
Red Hat Bugzilla: 0 Design link:
Feature Milestone:
Design review: Fedora test page:
Chosen: Candidate to push out:
Release Notes:
Temp mark:


A buffer is defined as:

char phy80211_path[SYSFS_IFACE_PATH_MAX];

But later data is snprintf-ed into it with:

 ret = snprintf(phy80211_path, SYSFS_SUBDIR_PATH_MAX,
                "%s/%s", sysfs_path, PHY_80211_SUBDIR);

The buffer should have been declared with size of SYSFS_SUBDIR_PATH_MAX

Change History

comment:1 Changed 5 years ago by jhrozek

  • Owner changed from somebody to jhrozek

comment:2 Changed 5 years ago by jhrozek

  • Status changed from new to assigned
  • Patch Submitted set

comment:3 Changed 5 years ago by sgallagh

  • Status changed from assigned to closed
  • Resolution set to fixed
  • Component changed from SSSD to Service Monitor
  • Milestone changed from NEEDS_TRIAGE to SSSD 1.7.0

comment:4 Changed 5 years ago by sgallagh

  • Red Hat Bugzilla set to 0
Note: See TracTickets for help on using tickets.