Skip to content

Conversation

@Marsman1996
Copy link
Contributor

Fix #222

Refer:
https://github.com/torvalds/linux/blob/c072629f05d7bca1148ab17690d7922a31423984/net/unix/af_unix.c#L335-L339

static int unix_validate_addr(struct sockaddr_un *sunaddr, int addr_len)
{
	if (addr_len <= offsetof(struct sockaddr_un, sun_path) ||
	    addr_len > sizeof(*sunaddr))
		return -EINVAL;

The Linux use <=

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.

Index out of bounds in parse_socket_address when handling Unix socket with empty path

1 participant