The following issues were found
include/drm/drm_writeback.h
1 issues
Line: 84
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
*
* The name of the connector's fence timeline.
*/
char timeline_name[32];
};
/**
* struct drm_writeback_job - DRM writeback job
*/
Reported by FlawFinder.
include/keys/request_key_auth-type.h
1 issues
Line: 24
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
void *callout_info;
size_t callout_len;
pid_t pid;
char op[8];
} __randomize_layout;
static inline struct request_key_auth *get_request_key_auth(const struct key *key)
{
return key->payload.data[0];
Reported by FlawFinder.
fs/btrfs/tree-defrag.c
1 issues
Line: 120
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
next_key_ret = btrfs_find_next_key(root, path, &key, 1,
BTRFS_OLDEST_GENERATION);
if (next_key_ret == 0) {
memcpy(&root->defrag_progress, &key, sizeof(key));
ret = -EAGAIN;
}
out:
btrfs_free_path(path);
if (ret == -EAGAIN) {
Reported by FlawFinder.
include/linux/property.h
1 issues
Line: 285
Column: 10
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
u16 u16_data[sizeof(u64) / sizeof(u16)];
u32 u32_data[sizeof(u64) / sizeof(u32)];
u64 u64_data[sizeof(u64) / sizeof(u64)];
const char *str[sizeof(u64) / sizeof(char *)];
} value;
};
};
/*
Reported by FlawFinder.
fs/btrfs/tree-checker.c
1 issues
Line: 596
Column: 4
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
*/
if (key->type == BTRFS_DIR_ITEM_KEY ||
key->type == BTRFS_XATTR_ITEM_KEY) {
char namebuf[max(BTRFS_NAME_LEN, XATTR_NAME_MAX)];
read_extent_buffer(leaf, namebuf,
(unsigned long)(di + 1), name_len);
name_hash = btrfs_name_hash(namebuf, name_len);
if (unlikely(key->offset != name_hash)) {
Reported by FlawFinder.
fs/btrfs/send.h
1 issues
Line: 29
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
};
struct btrfs_stream_header {
char magic[sizeof(BTRFS_SEND_STREAM_MAGIC)];
__le32 version;
} __attribute__ ((__packed__));
struct btrfs_cmd_header {
/* len excluding the header */
Reported by FlawFinder.
fs/btrfs/root-tree.c
1 issues
Line: 101
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (root_item)
btrfs_read_root_item(l, slot, root_item);
if (root_key)
memcpy(root_key, &found_key, sizeof(found_key));
out:
btrfs_release_path(path);
return ret;
}
Reported by FlawFinder.
fs/btrfs/ref-verify.c
1 issues
Line: 705
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ref->offset = offset;
ref->num_refs = (action == BTRFS_DROP_DELAYED_REF) ? -1 : 1;
memcpy(&ra->ref, ref, sizeof(struct ref_entry));
/*
* Save the extra info from the delayed ref in the ref action to make it
* easier to figure out what is happening. The real ref's we add to the
* ref tree need to reflect what we save on disk so it matches any
* on-disk refs we pre-loaded.
Reported by FlawFinder.
include/linux/stddef.h
1 issues
Line: 10
#undef NULL
#define NULL ((void *)0)
enum {
false = 0,
true = 1
};
#undef offsetof
Reported by Cppcheck.
include/linux/backing-dev-defs.h
1 issues
Line: 195
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
wait_queue_head_t wb_waitq;
struct device *dev;
char dev_name[64];
struct device *owner;
struct timer_list laptop_mode_wb_timer;
#ifdef CONFIG_DEBUG_FS
Reported by FlawFinder.