Главная » Все файлы » Просмотр файлов из архивов » PDF-файлы » 2005. Programming Languages Security - A Survey

2005. Programming Languages Security - A Survey, страница 3

PDF-файл 2005. Programming Languages Security - A Survey, страница 3 Конструирование компиляторов (53037): Статья - 7 семестр2005. Programming Languages Security - A Survey: Конструирование компиляторов - PDF, страница 3 (53037) - СтудИзба2019-09-18СтудИзба

Описание файла

PDF-файл из архива "2005. Programming Languages Security - A Survey", который расположен в категории "". Всё это находится в предмете "конструирование компиляторов" из 7 семестр, которые можно найти в файловом архиве МГУ им. Ломоносова. Не смотря на прямую связь этого архива с МГУ им. Ломоносова, его также можно найти и в других разделах. .

Просмотр PDF-файла онлайн

Текст 3 страницы из PDF

Cyclone assures that these pointers will never contain a NULL value, andthus NULL checks that create an overhead and lead to inefficient programs can be avoided. If a function is called witha pointer that could potentially have a NULL value, Cyclonewill protect against a possible error by introducing a NULLcheck at the point of function invocation. Functions can bedeclared to return @-pointers.Buffer overflows are prevented with restrained pointerarithmetic – pointer arithmetic is not allowed on *-pointersor @-pointers. Alternatively, pointer arithmetic is only supported on new “fat” pointers, indicated by “?”. These pointersare called “fat” as their representation consumes more spacethan *-pointers or @-pointers.

For example, instead of writing ‘‘int *p’’ in C, we write ‘‘int ?p’’ in Cycloneto define a fat pointer p. These pointers are modeled with anaddress and bounds information, which helps Cyclone determine the size of the array being dealt with, and to appropriately insert bounds checks to ensure safety. Cyclone automatically converts arrays and strings to ?-pointers as needed. Programmers can also explicitly cast a ?-pointer to a *-pointer orto a @-pointer. The former cast causes a bounds check to beinserted and the latter causes a NULL and bounds check to beinserted. *-pointers and @-pointers can be cast to ?-pointersin the absence of any checks, converting them into ?-pointersCycloneCyclone [21] is a type-safe dialect of C, that imposes some restrictions to preserve safety, and adds some features to regaincommon programming idioms in a safe way.Cyclone retains C’s syntax and semantics while preventing most common security vulnerabilities that are present inC programs [46].

It prevents safety violations in programs ina fashion similar to that of CCured, i.e. by using a combination of static analysis for memory management and run-timechecks for bounds violations.5of size 1. The inserted bounds checks and increased spaceusage cause fat pointers to be program overheads.To prevent the use of uninitialized pointers, Cyclone performs a static analysis of the source code, and an error isreported by the compiler if it detects that a pointer mightbe uninitialized. At times the analysis might not be prudentenough to deduce if something is correctly initialized or not.This may result in having the programmer be forced to initialize variables earlier than in C.

Uninitialized non-pointers arenot treated as errors.Dangling pointers dereferences are prevented using regionbased memory management. All memory in Cyclone is considered to be part of some region; which is defined to be asegment of memory that is deallocated all at once. There arethree types of regions – heap, stack and dynamic regions. Foreach pointer, Cyclone’s static region analysis keeps tabs onwhich region it points into. It also maintains a list of regionsthat are live at any stage in the program. Dereferencing apointer in a region marked as non-live is reported as an error.Cyclone prevents format string [46] vulnerabilities via theinduction of tagged unions. Tagged unions are data structuresthat can take on different types at different times (which isindicated by an explicit tag value). The tags can be used by afunction to correctly determine the type of its argument.Programmers however would need to explicitly add tags toarguments when they call a function, which can become cumbersome.

Cyclone provides a feature called “automatic tag injection” which guarantees that at compile-time the compilerwill add appropriate tag for all arguments.The performance of Cyclone is fairly good. In some rarecases, Cyclone programs can demonstrate better performancethan C programs because of the efficient region-based memory management.Cyclone version 1.0 is distributed as a compressed archive.It currently runs only on 32-bit machines. It has been testedon Linux, Windows 98/NT/2K/XP using the Cygwin environment, and on Mac OS X. Other platforms may or may notwork. To install and use Cyclone, the GNU utilities, including GCC (variant of gcc version 3; version 4 will not work)and GNU-Make are required.3.3ported. The rules for using these functions and data are alsomaintained by the interface and are checked at compile time.Interface rules are recorded using two keywords:• tracked – to identify resources manipulated by the interface• change specs – that show what each function does tothose resources.Violations of these rules will cause the compiler to reportan error.Vault uses keys to identify resources, and tracks the state ofthese resources by associating a state with each program pointwithin a function.

The state describes the set of keys held andtheir individual properties at a particular program point.Conditional access to objects is also supported by Vault.Varying conditions might need to be satisfied at different program points for the object to be accessed, these conditions aredescribed by using keys.The normal type system is extended to include a type guardfor different types, which determines if access to an object ispermitted. For example, it is possible to specify the availability of operations that can be performed on a variable (say, f1)of a specific type (say, file) through the usage of a “guard”variable (say, K):K:file f1;To access a guarded object, its key must be present in theheld-key set (a set of global keys, representing currently available resources).

Function types also have conditions indicating which keys must be held prior to the function call andwhich keys must be set on function return.Vault’s region-based memory management system is implemented by using these keys: when a region is created, akey is associated with it and all objects in that region are typeguarded by that key. When the region is deleted afterwards,the key is withdrawn from the held key-set and objects in theregion become inaccessible.Potentially dangerous uninitialized variables are preventedin Vault by having every variable initialized either to a explicitprogrammer specified value or to a default value.

Most basicVault datatypes are associated with a default value. It is illegalfor regular “*” pointers to contain NULL values. PotentiallyNULL pointers can be declared by suffixing the variable typewith a “?”.Type-safety is provided by disallowing arbitrary typecasts. Type-casts are only allowed between values ofthe following datatypes: byte, char, short, int,long, long long and string [100].Vault is a research prototype programming language andnot a Microsoft “product”. It has limited support and is notVaultVault [90], like Cyclone, is a safe version of the C programming language with a module system and a novel feature forspecifying and checking program resource (represented bykeys) use.

Programmers are able to control data layout andlifetime of program’s resources (such as memory) while being provided with safety guarantees.An interface is maintained for each Vault module that specifies the names and types of functions and data that are ex6encouraged to be used for critical development projects. TheMicrosoft C compiler and linker are needed in order to compile Vault programs.3.4concept that each operator has a unique type to determine thetypes of its operands. If the same operator, say “+”, is overloaded on integers and on floats, there could be two possibletypes for the result.

It would either be an integer (resultingfrom integer addition) or a float (resulting from floating-pointaddition). If the compiler decides on one of these, say integer,later uses of the result as a float would result in an error.OCaml supports polymorphic functions that enhance codere-usability by making it possible to write generic programsthat work for values of any type. It is trivial to define datastructures that can take on any type of element. A genericfunction could be written that could be applied to lists of integers or lists of records.It is a strictly 1 evaluated language which means that the arguments to a function are always evaluated completely beforethe function is applied.It also has an incremental 2 garbage collector so that memory need not be explicitly allocated and freed. There areno new(), malloc(), delete(), or free() functions.

Свежие статьи
Популярно сейчас
Зачем заказывать выполнение своего задания, если оно уже было выполнено много много раз? Его можно просто купить или даже скачать бесплатно на СтудИзбе. Найдите нужный учебный материал у нас!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Нашёл ошибку?
Или хочешь предложить что-то улучшить на этой странице? Напиши об этом и получи бонус!
Бонус рассчитывается индивидуально в каждом случае и может быть в виде баллов или бесплатной услуги от студизбы.
Предложить исправление
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
5076
Авторов
на СтудИзбе
455
Средний доход
с одного платного файла
Обучение Подробнее