Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

[PAM] Bound Checking, Unsigned Int, and Use of Macros in LIMIT.H #63

@zakuArbor

Description

@zakuArbor

Purpose

  • Bound checking when looping over arrays
    • Bound checking when using strncpy
  • use of unsigned variables to ensure numbers are not negative
  • More usage of macros defined in limit.h

Tasks/Goals

  • pam_bt_trust.c:
    • find_trusted_paired_devices:
      • use of unsigned for number of paired devices
      • ensure it's not over BT_MAX_CONN
    • get_trusted_dev_file:
      • increase filename size to use PATH_MAX and use LOGIN_NAME_MAX (will be assuming it's smaller than NAME_MAX which it is on Linux) to check length of username
      • bound check when strcpy that username and trusted_dir_path is not over the limit
    • set_trusted_devices:
      • use unsigned int for number of trusted devices
      • ensure number of trusted devices is limited to max of BT_MAX_CONN

Summary

To fill out once the issue is to be closed. Give a short summary of the changes you made to implement or fix an issue

Metadata

Metadata

Assignees

Labels

PAMhelp wantedExtra attention is neededsecurityA Security Related Change

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions