From fcf9cfbcdb7ddd05b0a005370460d39b12adda1c Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Tue, 27 Oct 2020 17:20:25 -0400 Subject: [PATCH 1/2] ames/zuse: require >64-bit comet addresses --- pkg/arvo/sys/vane/ames.hoon | 3 +++ pkg/arvo/sys/zuse.hoon | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 328c108520..04f6b3c53b 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1046,6 +1046,9 @@ ++ on-hear-open |= [=lane =packet ok=?] ^+ event-core + :: assert the comet can't pretend to be a moon or other address + :: + ?> (lth 64 (met 0 sndr.packet)) :: if we already know .sndr, ignore duplicate attestation :: =/ ship-state (~(get by peers.ames-state) sndr.packet) diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 4dc733ca8f..60cb40d9b7 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -9174,6 +9174,10 @@ |- ^- seed:able:jael =/ cub=acru:ames (pit:nu:crub:crypto 512 eny) =/ who=ship `@`fig:ex:cub + :: disallow 64-bit or smaller addresses + :: + ?: (gte 64 (met 0 sndr.packet)) + $(eny +(eny)) ?: (~(has in stars) (^sein:title who)) [who 1 sec:ex:cub ~] $(eny +(eny)) From 56db7cdcdad1856df76a4d0b7f6188875cb7e727 Mon Sep 17 00:00:00 2001 From: Ted Blackman Date: Tue, 27 Oct 2020 17:28:07 -0400 Subject: [PATCH 2/2] ames/zuse: require >64-bit comet addresses --- pkg/arvo/sys/vane/ames.hoon | 2 +- pkg/arvo/sys/zuse.hoon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 04f6b3c53b..0ebe2d09c1 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -1048,7 +1048,7 @@ ^+ event-core :: assert the comet can't pretend to be a moon or other address :: - ?> (lth 64 (met 0 sndr.packet)) + ?> ?=(%pawn (clan:title sndr.packet)) :: if we already know .sndr, ignore duplicate attestation :: =/ ship-state (~(get by peers.ames-state) sndr.packet) diff --git a/pkg/arvo/sys/zuse.hoon b/pkg/arvo/sys/zuse.hoon index 60cb40d9b7..8f495fca6b 100644 --- a/pkg/arvo/sys/zuse.hoon +++ b/pkg/arvo/sys/zuse.hoon @@ -9176,7 +9176,7 @@ =/ who=ship `@`fig:ex:cub :: disallow 64-bit or smaller addresses :: - ?: (gte 64 (met 0 sndr.packet)) + ?. ?=(%pawn (clan:title who)) $(eny +(eny)) ?: (~(has in stars) (^sein:title who)) [who 1 sec:ex:cub ~]