Skip to content

Commit

Permalink
netgraph: Fix CHERI tag violations due to tight subobject bounds in s…
Browse files Browse the repository at this point in the history
…ockaddr_* structs
  • Loading branch information
RoundofThree committed Dec 29, 2024
1 parent 60fed0d commit de3f5d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sys/netgraph/bluetooth/include/ng_btsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
struct sockaddr_hci {
u_char hci_len; /* total length */
u_char hci_family; /* address family */
char hci_node[32]; /* address (size == NG_NODESIZ ) */
char hci_node[32] __subobject_variable_length_maxsize(32); /* address (size == NG_NODESIZ ) */

Check warning on line 54 in sys/netgraph/bluetooth/include/ng_btsocket.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters

Check warning on line 54 in sys/netgraph/bluetooth/include/ng_btsocket.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
};

/* Raw HCI socket options */
Expand Down
2 changes: 1 addition & 1 deletion sys/netgraph/ng_socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum {
struct sockaddr_ng {
unsigned char sg_len; /* total length */
sa_family_t sg_family; /* address family */
char sg_data[32]; /* see NG_NODESIZ in ng_message.h */
char sg_data[32] __subobject_variable_length_maxsize(32); /* see NG_NODESIZ in ng_message.h */

Check warning on line 63 in sys/netgraph/ng_socket.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters

Check warning on line 63 in sys/netgraph/ng_socket.h

View workflow job for this annotation

GitHub Actions / Style Checker

line over 80 characters
};

#endif /* _NETGRAPH_NG_SOCKET_H_ */

Check warning on line 66 in sys/netgraph/ng_socket.h

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

Check warning on line 66 in sys/netgraph/ng_socket.h

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line

0 comments on commit de3f5d8

Please sign in to comment.